Patch php54.patch for pdflib Bug #60397
Patch version 2011-11-27 08:11 UTC
Return to Bug #60397 |
Download this patch
Patch Revisions:
Developer: fedora@famillecollet.com
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,
|