#16535 [Com]: Line breaks not correctly counted when file has Mac line endings

From: Date: Wed, 25 Jun 2003 22:03:51 +0000
Subject: #16535 [Com]: Line breaks not correctly counted when file has Mac line endings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42517@lists.php.net to get a copy of this message
ID: 16535 Comment by: dradigan at macromedia dot com Reported By: danradigan at yahoo dot com Status: No Feedback Bug Type: Scripting Engine problem Operating System: Mac OS X PHP Version: 4.1.2 New Comment: But to be clear, this does show up with pure mac line endings Previous Comments: ------------------------------------------------------------------------ [2003-06-25 17:01:00] dradigan at macromedia dot com I still see this bug in 4.3.0. I have a file that I will email you that shows the problem. If I use mac line endings the error is at line 44. If I use unix line endings it shows at 67. ------------------------------------------------------------------------ [2002-08-22 01:00:10] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-04-10 16:33:39] derick@php.net Hello, can you verify if this occurs when you have mixed line endings (other then only Mac endings) or just always (only Mac line endings). Derick ------------------------------------------------------------------------ [2002-04-10 16:27:43] danradigan at yahoo dot com Related bug Bug #10631, refiled per that bug since I still see it. ------------------------------------------------------------------------ [2002-04-10 16:26:42] danradigan at yahoo dot com When a file is saved using Macintosh-style line breaks ('\r') and there is some kind of error in the script (maybe a parse error, etc.) then the line number that is reported is always less than the line it occured on. In my script PHP told me line 84, but it was actually 93. It's a fairly minor thing, but annoying nonetheless. A workaround, obviously, is to make sure you save your scripts with Unix line-breaks ('\n'). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16535&edit=1

« previous php.bugs (#42517) next »