Bug #63462 [Asn]: Magic methods called twice for unset protected properties

From: Date: Mon, 14 Jan 2013 08:18:11 +0000
Subject: Bug #63462 [Asn]: Magic methods called twice for unset protected properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-175993@lists.php.net to get a copy of this message
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
 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:

https://github.com/php/php-src/pull/258 should
fix it (will be applied soon if no 
problem is found).


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#175993) next »