summaryrefslogtreecommitdiff
path: root/ext/xsl
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2016-02-15 01:53:02 -0800
committerStanislav Malyshev <stas@php.net>2016-02-15 01:53:02 -0800
commitc1355152dbdf131ebda1a21e7c66913b4ed9037c (patch)
tree62b8b10df9ea154570a641d449cf7ea18b582cfe /ext/xsl
parente34a7a1b08342489e5ee1a83b00d98c4d9084c83 (diff)
downloadphp-git-c1355152dbdf131ebda1a21e7c66913b4ed9037c.tar.gz
More fixing for bug #71540
Diffstat (limited to 'ext/xsl')
-rw-r--r--ext/xsl/tests/bug71540.phpt2
-rw-r--r--ext/xsl/xsltprocessor.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/xsl/tests/bug71540.phpt b/ext/xsl/tests/bug71540.phpt
index e93fb0e125..a268021765 100644
--- a/ext/xsl/tests/bug71540.phpt
+++ b/ext/xsl/tests/bug71540.phpt
@@ -55,6 +55,8 @@ Warning: XSLTProcessor::transformToXml(): Stack usage errror in %sbug71540.php o
Warning: XSLTProcessor::transformToXml(): Stack usage errror in %sbug71540.php on line %d
+Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %sbug71540.php on line %d
+
Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: 2 objects left on the stack. in %sbug71540.php on line %d
Warning: XSLTProcessor::transformToXml(): runtime error: file %s line 13 element value-of in %sbug71540.php on line %d
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index ec3042311d..600c7cddb0 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -304,7 +304,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
obj = valuePop(ctxt);
- if (obj->stringval == NULL) {
+ if (obj == NULL || obj->stringval == NULL) {
php_error_docref(NULL, E_WARNING, "Handler name must be a string");
xmlXPathFreeObject(obj);
valuePush(ctxt, xmlXPathNewString((const xmlChar *) ""));