summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-12-07 17:29:53 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-12-07 17:29:53 +0000
commitff3774d1eee02c7a06c6c6d672ac2e989b9f68e8 (patch)
treeb3b50ff448c5ac6d7e17263a438b79392f0646d7
parent89aa330637572e3dc5bcea9e190eb2b8248c5625 (diff)
downloadphp-git-ff3774d1eee02c7a06c6c6d672ac2e989b9f68e8.tar.gz
Let's not crash when no error str has been set
-rw-r--r--ext/xslt/sablot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c
index 7902d4f1b7..6178330a2f 100644
--- a/ext/xslt/sablot.c
+++ b/ext/xslt/sablot.c
@@ -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;
+ }
}
/* }}} */