From ff3774d1eee02c7a06c6c6d672ac2e989b9f68e8 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Fri, 7 Dec 2001 17:29:53 +0000 Subject: [PATCH] Let's not crash when no error str has been set --- ext/xslt/sablot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; + } } /* }}} */ -- 2.50.1