diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-11 00:20:50 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-11 00:20:50 +0000 |
commit | 973937e7aa6ca7f4a351acccf7cf0a18b038f579 (patch) | |
tree | d8ddd55a2847a7386e383fc1f157147018235c60 /sapi/cli/php_cli.c | |
parent | 5fc6842817bcb6636cd1c1ad870ec1c949a0b0fd (diff) | |
download | php-git-973937e7aa6ca7f4a351acccf7cf0a18b038f579.tar.gz |
Fix the line numbering when the 1st line in the script is #!.
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r-- | sapi/cli/php_cli.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 412180b577..43d6049854 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -414,6 +414,7 @@ int main(int argc, char *argv[]) zend_llist global_vars; int interactive=0; int module_started = 0; + int lineno = 0; char *exec_direct=NULL; char *param_error=NULL; /* end of temporary locals */ @@ -702,7 +703,7 @@ int main(int argc, char *argv[]) fseek(file_handle.handle.fp, pos - 1, SEEK_SET); } } - CG(start_lineno) = 2; + lineno = 2; } else { rewind(file_handle.handle.fp); } @@ -733,6 +734,7 @@ int main(int argc, char *argv[]) PUTS("Could not startup.\n"); goto err; } + CG(start_lineno) = lineno; *arg_excp = arg_free; /* reconstuct argv */ if (no_headers) { SG(headers_sent) = 1; |