]> granicus.if.org Git - php/commitdiff
MFZE1
authorIlia Alshanetsky <iliaa@php.net>
Tue, 5 Nov 2002 22:01:35 +0000 (22:01 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 5 Nov 2002 22:01:35 +0000 (22:01 +0000)
Zend/zend_language_scanner.l

index 62390f1785beb11ae0949286f60ed3a3255fda3d..6dc7867c8b378e187db336df0993af19cfb15556 100644 (file)
@@ -248,7 +248,13 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
        }
 
        zend_set_compiled_filename(file_path TSRMLS_CC);
-       CG(zend_lineno) = 1;
+       
+       if (CG(zend_lineno) < 0) { /* position is (n_lines * -1), position was changed by an external app */
+               CG(zend_lineno) = CG(zend_lineno) * -1;
+       } else {
+               CG(zend_lineno) = 1;
+       }
+       
        CG(increment_lineno) = 0;
        return SUCCESS;
 }