]> granicus.if.org Git - php/commitdiff
Fix a segfault, when an unknown type was given support all known xpath object types
authorChristian Stocker <chregu@php.net>
Wed, 14 Jun 2006 09:41:28 +0000 (09:41 +0000)
committerChristian Stocker <chregu@php.net>
Wed, 14 Jun 2006 09:41:28 +0000 (09:41 +0000)
ext/xsl/xsltprocessor.c

index d574ed410c7599a35762c217b5bc78c9aa74a254..6208e4631137f57e3063a546ae18893542861c56 100644 (file)
@@ -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];