#38440 [Opn]: json_decode() on boolean strings returns NULL

From: Date: Sun, 13 Aug 2006 07:23:22 +0000
Subject: #38440 [Opn]: json_decode() on boolean strings returns NULL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100725@lists.php.net to get a copy of this message
ID: 38440 User updated by: clay at killersoft dot com -Summary: json_decode('true') returns NULL Reported By: clay at killersoft dot com Status: Open Bug Type: Unknown/Other Function Operating System: Mac OS X 10.4.7 PHP Version: 5.2.0RC1 New Comment: var_dump(json_decode('false')); Should return: bool(false); Actually returns: NULL Previous Comments: ------------------------------------------------------------------------ [2006-08-13 07:05:06] clay at killersoft dot com Description: ------------ JSON decoder returns NULL when passed a string containing 'true'. Reproduce code: --------------- var_dump(json_decode('true')); Expected result: ---------------- bool(true) Actual result: -------------- NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38440&edit=1

« previous php.bugs (#100725) next »