summaryrefslogtreecommitdiffstats
path: root/pdflib-php54.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pdflib-php54.patch')
-rw-r--r--pdflib-php54.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/pdflib-php54.patch b/pdflib-php54.patch
new file mode 100644
index 0000000..96f8c8e
--- /dev/null
+++ b/pdflib-php54.patch
@@ -0,0 +1,36 @@
+diff -up pdflib-2.1.8/pdf7.c.php54 pdflib-2.1.8/pdf7.c
+--- pdflib-2.1.8/pdf7.c.php54 2011-11-27 08:55:33.068642986 +0100
++++ pdflib-2.1.8/pdf7.c 2011-11-27 08:56:40.703860070 +0100
+@@ -332,10 +332,14 @@ pdflib_object_new_ex(zend_class_entry *c
+
+ ALLOC_HASHTABLE(intern->std.properties);
+ zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
++#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->std.properties,
+ &class_type->default_properties,
+ (copy_ctor_func_t) zval_add_ref,
+ (void *) &tmp, sizeof(zval *));
++#else
++ object_properties_init( (zend_object*)intern, class_type );
++#endif
+
+ retval.handle = zend_objects_store_put(intern, NULL,
+ (zend_objects_free_object_storage_t)pdflib_object_dtor,
+diff -up pdflib-2.1.8/pdf.c.php54 pdflib-2.1.8/pdf.c
+--- pdflib-2.1.8/pdf.c.php54 2011-11-27 08:53:51.378310945 +0100
++++ pdflib-2.1.8/pdf.c 2011-11-27 08:56:31.184829597 +0100
+@@ -766,10 +766,14 @@ pdflib_object_new_ex(zend_class_entry *c
+
+ ALLOC_HASHTABLE(intern->std.properties);
+ zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
++#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->std.properties,
+ &class_type->default_properties,
+ (copy_ctor_func_t) zval_add_ref,
+ (void *) &tmp, sizeof(zval *));
++#else
++ object_properties_init( (zend_object*)intern, class_type );
++#endif
+
+ retval.handle = zend_objects_store_put(intern, NULL,
+ (zend_objects_free_object_storage_t)pdflib_object_dtor,