# php 4.3.2 overload bug

- Thread: https://externals.io/message/3553
- Original archive: https://news-web.php.net/php.internals/3553
- Started by walt boring on 2003-07-21T20:08:08+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3553 — walt boring — 2003-07-21T20:08:08+00:00

URL: https://externals.io/message/3553#3553

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
