|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-06-05 16:06 UTC] key at kemcity dot ru
Description: ------------ While debugging and getting some error I receive the error in wrong line number. I suppose strict errors, not like a missing bracket or something like that. For example unknown method, variable and something like that. So, line number can be defined surely. After than I've played with __LINE__ and I've got a result. It reported some strange number of line. I suppose it's linked to CR, LF: i can reproduce this bug hard ;) So, the url is included in bugreport. Good luck. I had this bug before and find it very annoying. Some replics of others in the Internet doesn't answer at all. P.S. Script doesn't have a # sign at the top. Reproduce code: --------------- The page with links to 2 tests and 2 source codes: http://key.users.kemcity.ru/ Direct Links Test1: http://key.users.kemcity.ru/index1.php Test2: http://key.users.kemcity.ru/index2.php Source Code Source1: http://key.users.kemcity.ru/index1.txt Source2: http://key.users.kemcity.ru/index2.txt Expected result: ---------------- Test1: Does 10=10? [/www/htdocs/users/homepage/key/index1.php] Test2: Does 7=7? [/www/htdocs/users/homepage/key/index2.php] Actual result: -------------- Test1: Does 4=10? [/www/htdocs/users/homepage/key/index1.php] Test2: Does 4=7? [/www/htdocs/users/homepage/key/index2.php] PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 12:00:01 2025 UTC |
For my followers: to change the script appropriate the requirements, you should replace any occurence of "wrong" newline. I used the next simple script: $filenameIn="funct.php"; $filenameOut="funct.out.php"; $x=fopen($filenameIn,"r"); $buf=fread($x,filesize($filenameIn)); fclose($x); $buf=preg_replace("/\r([^\n])/si","\r\n$1",$buf); $buf=preg_replace("/([^\r])\n/si","$1\r\n",$buf); $x=fopen($filenameOut,"w+"); fwrite($x,$buf); fclose($x);