summaryrefslogtreecommitdiffstats
path: root/pdflib-php54.patch
blob: 96f8c8e0b4b7bd1abe0729a610b52d1c410ea5c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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,