From: Christian Stocker Date: Wed, 14 Jun 2006 09:42:35 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.2.0RC1~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7fd19b7ff8b9557c3b1d7f45bdf3f3829d34c2a;p=php MFH Fix a segfault, when an unknown type was given and support all known xpath object types --- diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index bad79830f8..c3ce0ea89f 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -231,8 +231,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t } break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "php:function object type %d is not supported yet", obj->type); - ZVAL_STRING(args[i], "", 0); + ZVAL_STRING(args[i], xmlXPathCastToString(obj), 1); } xmlXPathFreeObject(obj); fci.params[i] = &args[i];