]> granicus.if.org Git - php/commitdiff
MFH: $errmsg should have been forced reference
authorSara Golemon <pollita@php.net>
Wed, 11 Aug 2004 04:10:44 +0000 (04:10 +0000)
committerSara Golemon <pollita@php.net>
Wed, 11 Aug 2004 04:10:44 +0000 (04:10 +0000)
ext/standard/basic_functions.c

index 01209f4d6c35aaee3eac833e85985b8c1444273e..61b2a8bf3078329c4ee863b92c7f8646ec6e536d 100644 (file)
@@ -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);
                }