From: Sara Golemon Date: Wed, 11 Aug 2004 04:10:44 +0000 (+0000) Subject: MFH: $errmsg should have been forced reference X-Git-Tag: php-5.0.1RC2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ea962c7671cecf0b0f307da13c0c24c42191ac7;p=php MFH: $errmsg should have been forced reference --- 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); }