mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
MFZE1 - lineno fix
This commit is contained in:
parent
b5d97e5ddb
commit
cf05f34c66
@ -79,6 +79,7 @@ void zend_init_compiler_data_structures(TSRMLS_D)
|
||||
zend_stack_init(&CG(list_stack));
|
||||
CG(handle_op_arrays) = 1;
|
||||
CG(in_compilation) = 0;
|
||||
CG(start_lineno) = 0;
|
||||
init_compiler_declarables(TSRMLS_C);
|
||||
CG(throw_list) = NULL;
|
||||
zend_register_auto_global("GLOBALS", sizeof("GLOBALS")-1 TSRMLS_CC);
|
||||
|
@ -119,6 +119,7 @@ struct _zend_compiler_globals {
|
||||
|
||||
int interactive;
|
||||
|
||||
zend_uint start_lineno;
|
||||
zend_bool in_clone_method;
|
||||
zend_bool increment_lineno;
|
||||
|
||||
|
@ -248,8 +248,9 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
|
||||
|
||||
zend_set_compiled_filename(file_path TSRMLS_CC);
|
||||
|
||||
if (CG(zend_lineno) < 0) { /* position is (n_lines * -1), position was changed by an external app */
|
||||
CG(zend_lineno) = CG(zend_lineno) * -1;
|
||||
if (CG(start_lineno)) {
|
||||
CG(zend_lineno) = CG(start_lineno);
|
||||
CG(start_lineno) = 0;
|
||||
} else {
|
||||
CG(zend_lineno) = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user