ID:          30211
 Updated by:  [EMAIL PROTECTED]
-Summary:     Method argument type-mismatch returns error with wrong
              line-number
 Reported By: m dot leuffen at i-line dot net
 Status:      Open
-Bug Type:    Class/Object related
+Bug Type:    Feature/Change Request
 PHP Version: 5.0.1
 New Comment:

The line number is not wrong it is simply the method's line number
instead of the caller's line number you expected. So this is a feature
request.


Previous Comments:
------------------------------------------------------------------------

[2004-09-23 16:55:49] m dot leuffen at i-line dot net

Description:
------------
Hi,

if you define a ObjectType in Argument-List of a Method, the
Line-Number (in Error-Message) points to the Method and not to the Line
the argument is set.

This makes debugging very hard ;-)

Bye,
  Matthias

Reproduce code:
---------------
01: <?PHP
02: class Test {
03:     
04:     public static function testmethod (Test $obj) {
05:     }
06: }
07:
08: $string = "I'm a string";
09: Test::testmethod ($string);
10: ?>

Expected result:
----------------
Fatal error: Argument 1 must be an object of class Test in test.php on
line 9


Actual result:
--------------
Fatal error: Argument 1 must be an object of class Test in test.php on
line 4



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30211&edit=1

Reply via email to