php 4.3.2 overload bug
| From: | walt boring | Date: | Mon, 21 Jul 2003 20:08:08 +0000 |
| Subject: | php 4.3.2 overload bug | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-3553@lists.php.net to get a copy of this message | ||
Howdy,
I have found a bug in the overload extension for php 4.3.2. I know it is labeled as Experimental, but I thought I'd report it, since it is causing me problems.
I get an error
Fatal error: Only variables can be passed by reference in /home/waboring/overload_test.php on line 16
<?php
function do_something(&$a) {
echo $a;
}
class FooClass {
var $_a = 1;
function __set($name,&$value) {
return true; } }overload('FooClass'); $foo = new FooClass; do_something($foo->_a); ?> If I don't declare __set() in FooClass, then the error doesn't happen. Also if I don't declare the do_something() parameter as a reference, I don't get the error. I haven't tried this in the php5 cvs tree yet. Walt