From 64f77577f054dc83a19e42f55724f41ed45986db Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 5 Nov 2002 22:04:12 +0000 Subject: [PATCH] Fixed bug #20035. ZE now allows us to pass the current line position by setting zend_lineno to (current_line * -1). --- sapi/cgi/cgi_main.c | 2 +- sapi/cli/php_cli.c | 2 +- sapi/fastcgi/fastcgi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 6dd85e20fb..2d707d7e43 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1119,7 +1119,7 @@ consult the installation file that came with this distribution, or visit \n\ while (c != 10 && c != 13) { c = fgetc(file_handle.handle.fp); /* skip to end of line */ } - CG(zend_lineno)++; + CG(zend_lineno) = -2; } else { rewind(file_handle.handle.fp); } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 28a06a1733..c986ee3dc7 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -652,7 +652,7 @@ int main(int argc, char *argv[]) while (c != 10 && c != 13) { c = fgetc(file_handle.handle.fp); /* skip to end of line */ } - CG(zend_lineno)++; + CG(zend_lineno) = -2; } else { rewind(file_handle.handle.fp); } diff --git a/sapi/fastcgi/fastcgi.c b/sapi/fastcgi/fastcgi.c index 23fd8c0aec..f9430943e1 100644 --- a/sapi/fastcgi/fastcgi.c +++ b/sapi/fastcgi/fastcgi.c @@ -237,7 +237,7 @@ static void fastcgi_module_main(TSRMLS_D) while (c != 10 && c != 13) { c = fgetc(file_handle.handle.fp); /* skip to end of line */ } - CG(zend_lineno)++; + CG(zend_lineno) = -2; } else { rewind(file_handle.handle.fp); } -- 2.50.1