Bug #63462 [Asn->Csd]: Magic methods called twice for unset protected properties
Edit report at https://bugs.php.net/bug.php?id=63462&edit=1
ID: 63462
Updated by: stas@php.net
Reported by: ocramius at gmail dot com
Summary: Magic methods called twice for unset protected
properties
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 5.4.8
Assigned To: dmitry
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=33b104c778c5c0e5446671397aaddd66efa4a7bc
Log: fix bug #63462 (Magic methods called twice for unset protected properties)
Previous Comments:
------------------------------------------------------------------------
[2013-01-14 08:18:11] stas@php.net
https://github.com/php/php-src/pull/258 should
fix it (will be applied soon if no
problem is found).
------------------------------------------------------------------------
[2012-11-08 07:34:06] laruence@php.net
similar to #55731
------------------------------------------------------------------------
[2012-11-08 05:47:23] ocramius at gmail dot com
I've added the failing test case as a PR at https://github.com/php/php-src/pull/229
------------------------------------------------------------------------
[2012-11-08 05:40:59] ocramius at gmail dot com
Description:
------------
When un-setting a private or protected property of an object, magic methods get called twice when
that property is accessed.
Test script:
---------------
https://gist.github.com/4037010
(will provide PR with the test later)
Expected result:
----------------
Each of the magic methods presented in the test script should be called only once per checked
property.
Actual result:
--------------
Each of the magic methods are called twice for private or protected properties that were unset.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63462&edit=1
Thread (6 messages)