]> git.sesse.net Git - xml-template/commitdiff
In php5-swig, handle NULLs as empty strings instead of crashing on them in substitute.
authorsgunderson@bigfoot.com <>
Fri, 23 Sep 2011 22:06:53 +0000 (00:06 +0200)
committersgunderson@bigfoot.com <>
Fri, 23 Sep 2011 22:06:53 +0000 (00:06 +0200)
php5-swig/xml-template.swig

index d70e223fec9d1355d7727247876bedf630105374..e39053c0e1f8a7a958c83023f79cb79f51cf1b13 100644 (file)
@@ -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;