php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63462 Magic methods called twice for unset protected properties
Submitted: 2012-11-08 05:40 UTC Modified: 2013-01-14 08:18 UTC
From: ocramius at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4.8 OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ocramius at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-08 05:40 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-08 05:47 UTC] 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 07:34 UTC] laruence@php.net
similar to #55731
 [2012-12-19 06:40 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2013-01-14 08:18 UTC] stas@php.net
https://github.com/php/php-src/pull/258 should fix it (will be applied soon if no 
problem is found).
 [2013-01-18 21:48 UTC] stas@php.net
-Status: Assigned +Status: Closed
 [2013-01-18 21:48 UTC] stas@php.net
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)
 [2013-03-01 18:32 UTC] stas@php.net
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)
 [2014-10-07 23:20 UTC] stas@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=33b104c778c5c0e5446671397aaddd66efa4a7bc
Log: fix bug #63462 (Magic methods called twice for unset protected properties)
 [2014-10-07 23:31 UTC] stas@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=33b104c778c5c0e5446671397aaddd66efa4a7bc
Log: fix bug #63462 (Magic methods called twice for unset protected properties)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 03:01:27 2024 UTC