#34462 [Opn->Csd]: isset($this->$x) no longer works when $x not set with PHP 5.05
| From: | sniper@php.net | Date: | Sun, 11 Sep 2005 22:32:23 +0000 |
| Subject: | #34462 [Opn->Csd]: isset($this->$x) no longer works when $x not set with PHP 5.05 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84884@lists.php.net to get a copy of this message | ||
ID: 34462
Updated by: sniper@php.net
Reported By: bduclaux at yahoo dot com
-Status: Open
+Status: Closed
Bug Type: Class/Object related
Operating System: Fedora Core 4
PHP Version: 5.0.5
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Works fine with PHP 5.1-dev.
Previous Comments:
------------------------------------------------------------------------
[2005-09-11 14:36:48] bduclaux at yahoo dot com
Description:
------------
PHP 5.05 modifies the handling of isset($this->$x) when $x is not set.
This breaks many existing scripts, and is not properly documented IMHO.
Reproduce code:
---------------
<?php
class A {
function A() {
$x='';
var_dump(isset($this->$x));
}
}
new A();
?>
With php 5.05 :
Fatal error: Cannot access empty property in /home/sysop/test.php on
line 5
With php 5.04:
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34462&edit=1