#31006 [NEW]: __get : fictive attribute can be accessed only once !
| From: | naholyr at yahoo dot fr | Date: | Tue, 07 Dec 2004 09:04:06 +0000 |
| Subject: | #31006 [NEW]: __get : fictive attribute can be accessed only once ! | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-69879@lists.php.net to get a copy of this message | ||
From: naholyr at yahoo dot fr
Operating system: Windows 2K, XP
PHP version: 5.0.2
PHP Bug Type: Class/Object related
Bug description: __get : fictive attribute can be accessed only once !
Description:
------------
See the file in "Reproduce code" section. My english is bad and a sample
is always better than explanations.
The method to focus is Field::__get().
In this file you'll find 2 codes:
# BUGGY.PHP
The code which reproduces the bug.
# NOTBUGGY.PHP
The code which works.
We have invented single use attributes ! lol
And the best: __set is not affected...
Reproduce code:
---------------
http://naholyr.free.fr/php/__get.txt
Expected result:
----------------
MyName - MyName
Actual result:
--------------
MyName - Fatal error: Cannot access private property Field::$_value in ###
on line ##
--
Edit bug report at http://bugs.php.net/?id=31006&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31006&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31006&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31006&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31006&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31006&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31006&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31006&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31006&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31006&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31006&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31006&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31006&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31006&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31006&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31006&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31006&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31006&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31006&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31006&r=mysqlcfg