From 6ea962c7671cecf0b0f307da13c0c24c42191ac7 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Wed, 11 Aug 2004 04:10:44 +0000 Subject: [PATCH] MFH: $errmsg should have been forced reference --- ext/standard/basic_functions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 01209f4d6c..61b2a8bf30 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -479,7 +479,7 @@ function_entry basic_functions[] = { PHP_FALIAS(show_source, highlight_file, NULL) PHP_FE(highlight_string, NULL) PHP_FE(php_strip_whitespace, NULL) - PHP_FE(php_check_syntax, NULL) + PHP_FE(php_check_syntax, second_arg_force_ref) PHP_FE(ini_get, NULL) PHP_FE(ini_get_all, NULL) @@ -2336,10 +2336,10 @@ PHP_FUNCTION(php_check_syntax) PG(log_errors) = PG(display_errors) = 0; if (php_lint_script(&file_handle TSRMLS_CC) != SUCCESS) { - if (errm && PZVAL_IS_REF(errm)) { + if (errm) { char *error_str; - convert_to_string_ex(&errm); + zval_dtor(errm); spprintf(&error_str, 0, "%s in %s on line %d", PG(last_error_message), PG(last_error_file), PG(last_error_lineno)); ZVAL_STRING(errm, error_str, 0); } -- 2.50.1