diff options
| author | Zeev Suraski <zeev@php.net> | 2000-09-12 20:48:33 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 2000-09-12 20:48:33 +0000 |
| commit | 6c3d7449e12c7f6f82ce0c9d84afcecf6964d2c7 (patch) | |
| tree | 5f023a8aa7a5be318bb93d9253f30c6142541200 /ext/standard/basic_functions.c | |
| parent | 5286b3971cbe7763f1f5aa918a5a909f61968fe8 (diff) | |
| download | php-git-6c3d7449e12c7f6f82ce0c9d84afcecf6964d2c7.tar.gz | |
- Made eval() and several other runtime-evaluated code portions report the
nature and location of errors more accurately (Stas)
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index d047a59c75..70d63fa15e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1691,6 +1691,7 @@ PHP_FUNCTION(highlight_string) { pval **expr; zend_syntax_highlighter_ini syntax_highlighter_ini; + char *hicompiled_string_description; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &expr)==FAILURE) { WRONG_PARAM_COUNT; @@ -1699,10 +1700,14 @@ PHP_FUNCTION(highlight_string) convert_to_string_ex(expr); php_get_highlight_struct(&syntax_highlighter_ini); + + hicompiled_string_description = zend_make_compiled_string_description("highlighted code"); - if (highlight_string(*expr, &syntax_highlighter_ini)==FAILURE) { + if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description)==FAILURE) { + efree(hicompiled_string_description); RETURN_FALSE; } + efree(hicompiled_string_description); RETURN_TRUE; } /* }}} */ |
