Edit report at https://bugs.php.net/bug.php?id=49348&edit=1

 ID:                 49348
 Updated by:         s...@php.net
 Reported by:        BelStudent at yandex dot ru
 Summary:            Uninitialized ++$foo->bar; does not cause a notice
                     (but ++$bar; does!)
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        5.*, 6
 Assigned To:        stas
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of stas
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=0c6d903ce7615a7197cb997d67d98058c3ec5d6a
Log: fix bug #49348 - issue notice on get_property_ptr_ptr when used for read


Previous Comments:
------------------------------------------------------------------------
[2013-02-20 08:35:21] dmi...@php.net

I think the fix is fine, but it may go only into 5.5 and above.

------------------------------------------------------------------------
[2013-02-19 09:18:04] s...@php.net

Potential fix in this pull: https://github.com/php/php-src/pull/281

------------------------------------------------------------------------
[2013-02-19 04:59:16] s...@php.net

The problem here is that get_property_ptr_ptr does not produce notices. It 
doesn't 
because it does not know the fetch type - in some cases it's BP_VAR_W, then it 
shouldn't produce notice, in some it's BP_VAR_RW and then it should. However 
get_property_ptr_ptr doesn't have a parameter to pass this info.

Looks like such parameter needs to be added...

------------------------------------------------------------------------
[2009-09-01 08:41:52] sjo...@php.net

I was talking about this:
http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_execute.c?revision=286362&view=markup#l251

With ++$foo, type is BP_VAR_RW, which makes sense and gives a notice. With 
++$this->foo, it is BP_VAR_W.

------------------------------------------------------------------------
[2009-08-31 22:12:10] j...@php.net

# svn log -r100312 zend_object_handlers.c
------------------------------------------------------------------------
r100312 | stas | 2002-10-20 22:22:04 +0300 (Sun, 20 Oct 2002) | 2 lines

looks like this message should go

---

Stas, care to explain? Uncommenting that will bring back the notice.

And Sjoerd, what did you mean with that comment..?

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


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=49348


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=49348&edit=1

Reply via email to