From: sgunderson@bigfoot.com <> Date: Fri, 23 Sep 2011 22:06:53 +0000 (+0200) Subject: In php5-swig, handle NULLs as empty strings instead of crashing on them in substitute. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=c1442a39c69a0e27eaf47165e53c801672390acc;p=xml-template In php5-swig, handle NULLs as empty strings instead of crashing on them in substitute. --- diff --git a/php5-swig/xml-template.swig b/php5-swig/xml-template.swig index d70e223..e39053c 100644 --- a/php5-swig/xml-template.swig +++ b/php5-swig/xml-template.swig @@ -79,7 +79,7 @@ Directive* convert_php_objects_to_directive(zval *obj) return new ReplaceInclude(xmlCopyDoc((*doc)->ptr, 1)); } case IS_NULL: - return NULL; + return new Replace { "" }; default: printf("WARNING: Unknown type %d!\n", Z_TYPE_P(obj)); break;