Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86507 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32697 invoked from network); 7 Jun 2015 19:55:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2015 19:55:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:52913] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/90-27423-DB1A4755 for ; Sun, 07 Jun 2015 15:55:42 -0400 Received: from [192.168.0.100] ([95.89.139.132]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M6zkD-1ZE0qf2Qxp-00wlFm; Sun, 07 Jun 2015 21:55:32 +0200 Message-ID: <5574A1B3.30708@gmx.de> Date: Sun, 07 Jun 2015 21:55:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jakub Zelenka , PHP internals list References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:nP57ol0xP6OboGxxPoE/tqhID0PTIIkUzRSA6lGPD3fBHDYVCHX zNFS+8gQMgnQZbPgG78qOnSynGQjQ7JwRqW0ouf1WNIRQQ+lLnyWSLzKwFlvcWg6j/wgd4X jm/7g2Va2+2sTDu6uTgPFueefIN/SQSrsftkZLEfckCd6qqK5UsCUno70xwHfK9Be7Z7FnJ pzWBKzlt4ivlCZbkftUNA== X-UI-Out-Filterresults: notjunk:1; Subject: Re: JSON unicode escape issue and new constants From: cmbecker69@gmx.de (Christoph Becker) Jakub Zelenka wrote: > On Thu, May 28, 2015 at 7:53 PM, Jakub Zelenka wrote: > >> There are two issues (reported bugs but not really bugs) in json_decode >> related to \u escape. >> >> First one is >> json_decode('{"\u0000": 1}'); >> reported in https://bugs.php.net/bug.php?id=68546 >> >> That code result in fatal error due to using malformed property (private >> props starting with \0). I don't think that anything parsed in json_decode >> should result in a fatal error. That's why I would like to introduce a new >> json error called JSON_ERROR_MANGLED_PROPERTY_NAME . > > I have just created a PR for that: https://github.com/php/php-src/pull/1332 > .. So if any objecting (e.g. error name), then shout now before I merge it > to master... Have you considered JSON_ERROR_INVALID_PROPERTY_NAME instead of JSON_ERROR_MANGLED_PROPERTY_NAME, or for brevity JSON_ERROR_PROPERTY_NAME? If the issue is considered to be a bug, it might be reasonable to backport the fix to PHP 5.5 and 5.6. The json-0 patch, which is attached to the ticket, would have to be modified according to the error constant. -- Christoph M. Becker