Bug #50813 [Com]: __isset() not called for uninitialized array offsets $obj->test[0]

From: Date: Wed, 04 May 2016 23:16:01 +0000
Subject: Bug #50813 [Com]: __isset() not called for uninitialized array offsets $obj->test[0]
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200902@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
 Comment by:         sm0ke999 at yandex dot ru
 Reported by:        marc dot bennewitz at giata dot de
 Summary:            __isset() not called for uninitialized array offsets
                     $obj->test[0]
 Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        5.*, 6
 Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

Here valid link: https://github.com/php/php-src/commit/373da7aa6f5e7bf57d434fd449f97770fb479d3e

Dot in the end made link invalid in previous comment.


Previous Comments:
------------------------------------------------------------------------
[2016-03-26 11:17:26] nikic@php.net

Fixed by https://github.com/php/php-src/commit/373da7aa6f5e7bf57d434fd449f97770fb479d3e.

------------------------------------------------------------------------
[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)

------------------------------------------------------------------------


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


Thread (8 messages)

« previous php.bugs (#200902) next »