]> granicus.if.org Git - php/commitdiff
Fixed SIGSEGV
authorDmitry Stogov <dmitry@php.net>
Mon, 29 Aug 2005 06:51:51 +0000 (06:51 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 29 Aug 2005 06:51:51 +0000 (06:51 +0000)
main/main.c

index 6bc2a45f96623d33a0c784af3e2ce8e1fd69e1fb..0fa9fc0946ec49c59a38587e6587caa0d8925763 100644 (file)
@@ -572,7 +572,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
                stage = "PHP Shutdown";
        } else {
                function = get_active_function_name(TSRMLS_C);
-               if (function && !USTR_LEN(function)) {
+               if (!function || !USTR_LEN(function)) {
                        stage = "Unknown";
                        function = NULL;
                }
@@ -582,7 +582,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
        if (function) {
                spprintf(&origin, 0, "%v%s%v(%s)", class_name, space, function, params);        
        } else {
-               spprintf(&origin, 0, "%v", stage);      
+               spprintf(&origin, 0, "%s", stage);      
        }
 
        /* origin and buffer available, so lets come up with the error message */