PHP 4.0 Bug #3547: wrong line numbers reported for parse errors

From: Date: Mon, 21 Feb 2000 11:53:28 +0000
Subject: PHP 4.0 Bug #3547: wrong line numbers reported for parse errors
Groups: php.dev 
Request: Send a blank email to php-dev+get-15748@lists.php.net to get a copy of this message
From: phil@dialsolutions.co.uk Operating system: NT4 SP4 IIS4 PHP version: 4.0 Latest CVS (21/02/2000) PHP Bug Type: Scripting Engine problem Bug description: wrong line numbers reported for parse errors Using php4.0b4 (exe version) if a script 'requires' another script, and the parser encounters a parse error in the first script, the line number and file reported for the parse error are incorrect. This makes debugging a little difficult! This problem is also apparent in php4.0b3. Here are two test files which display the problem. foo.php has a deliberate error on line 3 where I have Test instead of $Test. foo.php <?php require("bar.php"); Test="hello"; ?> bar.php <?php //nothing in here but a few blank lines ?> When I load foo.php the following error message is displayed: Parse error: parse error in bar.php on line 7 If I change Test to $Test in foo.php the error message disappears.

« previous php.dev (#15748) next »