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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
24 - 22 = ?
Subscribe to this entry?

 
 [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: Thu Dec 12 11:01:28 2024 UTC