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

ext/xsl/xsltprocessor.c

index bad79830f81bf15753e14dd448f71c0b705443f1..c3ce0ea89f7a8770478c591ab6ff8a14aeaa246b 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];