ID: 39148
Updated by: [EMAIL PROTECTED]
Reported By: mihai at aviamotors dot ro
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: Windows XP
PHP Version: 5.1.6
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2006-10-13 14:29:55] mihai at aviamotors dot ro
Description:
------------
Type hinting does not work when forwarding a parameter from one
function to another.
Reproduce code:
---------------
function a(MyClass &$x)
{
return b($x);
}
function b(MyClass &$x)
{
return $x->Name;
}
Expected result:
----------------
To work.
Actual result:
--------------
Throws the following error:
Fatal error: Argument 1 passed to b() must be an object of class
MyClass
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39148&edit=1