Bug #50813 [Ver->Csd]: __isset() not called for uninitialized array offsets $obj->test[0]
| From: | nikic@php.net | Date: | Sat, 26 Mar 2016 11:17:28 +0000 |
| Subject: | Bug #50813 [Ver->Csd]: __isset() not called for uninitialized array offsets $obj->test[0] | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200105@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50813&edit=1
ID: 50813
Updated by: nikic@php.net
Reported by: marc dot bennewitz at giata dot de
Summary: __isset() not called for uninitialized array offsets
$obj->test[0]
-Status: Verified
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: *
PHP Version: 5.*, 6
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Fixed by https://github.com/php/php-src/commit/373da7aa6f5e7bf57d434fd449f97770fb479d3e.
Previous Comments:
------------------------------------------------------------------------
[2016-03-20 17:39:19] nikic@php.net
Related To: Bug #71359
------------------------------------------------------------------------
[2011-02-01 08:40:01] mjk at emmjaykay dot org
In my change, if I comment out the __isset definition, I get
Fatal error: Couldn't find implementation for method MyClass::__isset in Unknown on line 0
where as on the unchanged code, I get
Notice: Key "test" does not exist in /home/mjk/php-5.3.5.orig/e.php on line 22
bool(false)
I'm not sure if that's correct or not.
------------------------------------------------------------------------
[2011-02-01 07:55:20] mjk at emmjaykay dot org
I'm not so sure this patch is kosher since it checks the return value's lval from the call
to zend_std_call_issetter(). I don't see it in other code.
------------------------------------------------------------------------
[2010-01-21 12:03:48] marc dot bennewitz at giata dot de
Thats the same:
>php -v
PHP 5.3.3-dev (cli) (built: Jan 21 2010 12:52:05)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
>php test.php
PHP Notice: Key "test" does not exist in /tmp/test.php on line 14
Notice: Key "test" does not exist in /tmp/test.php on line 14
bool(false)
------------------------------------------------------------------------
[2010-01-21 09:59:53] jani@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=50813
--
Edit this bug report at https://bugs.php.net/bug.php?id=50813&edit=1