php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67548 Docs says json_last_error_msg should return null, but it returns 'No Error'
Submitted: 2014-06-30 23:05 UTC Modified: 2014-07-01 19:56 UTC
From: petah dot p at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: JSON related
PHP Version: 5.5.14 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: petah dot p at gmail dot com
New email:
PHP Version: OS:

 

 [2014-06-30 23:05 UTC] petah dot p at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.json-last-error-msg
---

Docs says json_last_error_msg should return null, but it returns 'No Error'

http://viper-7.com/xKaEFf

Test script:
---------------
<pre><?php
var_dump(json_decode('{}'));
var_dump(json_last_error_msg());


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-01 19:55 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=334064
Log: Clarify json_last_error_msg()'s return values.

Fixes doc bug #67548 (Docs says json_last_error_msg should return null, but it
returns 'No Error').
 [2014-07-01 19:56 UTC] aharvey@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: aharvey
 [2014-07-01 19:56 UTC] aharvey@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

I don't think that's what the text was intended to mean, but I've clarified it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC