Bug #72574 [Fbk->Asn]: Non encoded string with IP-address recognized as float by json_decode

From: Date: Tue, 12 Jul 2016 05:43:21 +0000
Subject: Bug #72574 [Fbk->Asn]: Non encoded string with IP-address recognized as float by json_decode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202225@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72574&edit=1 ID: 72574 User updated by: apuzanoff at gmail dot com Reported by: apuzanoff at gmail dot com Summary: Non encoded string with IP-address recognized as float by json_decode -Status: Feedback +Status: Assigned Type: Bug Package: JSON related Operating System: deb8u1 PHP Version: 5.6.23 Assigned To: cmb Block user comment: N Private report: N New Comment: json support => enabled json version => 1.3.6 JSON-C headers version => 0.11.99 JSON-C library version => 0.11.99 Previous Comments: ------------------------------------------------------------------------ [2016-07-11 12:05:02] cmb@php.net I can't reproduce with ext/json, see <https://3v4l.org/3lTDq>. However, Debian ships with json-c by default; which libjson do you use? ------------------------------------------------------------------------ [2016-07-11 09:31:17] apuzanoff at gmail dot com P.S. It works on windows php as expected. Empty string and JSON_ERROR_SYNTAX from json_last_error() ------------------------------------------------------------------------ [2016-07-11 09:27:11] apuzanoff at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.json-decode --- non encoded string with IP-address recognized as float Test script: --------------- echo json_decode('10.7.11.122'), '<br>'; Expected result: ---------------- empty string with generate error Actual result: -------------- 10.7 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72574&edit=1

« previous php.bugs (#202225) next »