From:             marcelo at beteltecnologia dot com dot br
Operating system: Windows XP
PHP version:      4.3.8
PHP Bug Type:     Class/Object related
Bug description:  object is no being passed by reference to reference defined method 

Description:
------------
I have a method that receives a object by reference. Despite the method
definition defines that the parameter should be taken by reference it is
being treated as it were a copy. 

Reproduce code:
---------------
class Myclass extends MyOtherClass
{

function mymethod(&$myobj) {
        $myobj->mymodifier('Parameter');
}
}

Expected result:
----------------
the 'mymodifier' method of the original 'myobj' object should be called.

Actual result:
--------------
PHP is calling the method 'mymofifier' for a copy of the instance of
'myobj'. 

I used Call-time pass-by reference, to avoid the problem but, since this
technique is deprecated I am reporting the bug.

-- 
Edit bug report at http://bugs.php.net/?id=29400&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29400&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29400&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29400&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29400&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29400&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29400&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29400&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29400&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29400&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29400&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29400&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29400&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29400&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29400&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29400&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29400&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29400&r=float

Reply via email to