]> granicus.if.org Git - php/commitdiff
Let's not crash when no error str has been set
authorRasmus Lerdorf <rasmus@php.net>
Fri, 7 Dec 2001 17:29:53 +0000 (17:29 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 7 Dec 2001 17:29:53 +0000 (17:29 +0000)
ext/xslt/sablot.c

index 7902d4f1b7f061ee000b06cc50ba39ae98959b9c..6178330a2f64ab3851c09d6f7bc91229a3485a11 100644 (file)
@@ -581,7 +581,11 @@ PHP_FUNCTION(xslt_error)
        }
        ZEND_FETCH_RESOURCE(handle, php_xslt *, processor_p, -1, le_xslt_name, le_xslt);
 
-       RETURN_STRING(XSLT_ERRSTR(handle), 1);  
+       if(XSLT_ERRSTR(handle)) {
+               RETURN_STRING(XSLT_ERRSTR(handle), 1);  
+       } else {
+               RETURN_FALSE;
+       }
 }
 /* }}} */