From:             m dot leuffen at i-line dot net
Operating system: 
PHP version:      5.0.1
PHP Bug Type:     Class/Object related
Bug description:  Method argument type-mismatch returns error with wrong line-number

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

Reply via email to