diff options
Diffstat (limited to 'xlswriter-php82.patch')
-rw-r--r-- | xlswriter-php82.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/xlswriter-php82.patch b/xlswriter-php82.patch deleted file mode 100644 index 912beda..0000000 --- a/xlswriter-php82.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5ec02a705d9171150035b028af622f913088ff7f Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 16 Sep 2022 11:43:18 +0200 -Subject: [PATCH] Fix for PACKED array on PHP 8.2 - ---- - kernel/excel.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/kernel/excel.c b/kernel/excel.c -index 698db1f..093c1ce 100644 ---- a/kernel/excel.c -+++ b/kernel/excel.c -@@ -627,7 +627,8 @@ PHP_METHOD(vtiful_xls, header) - */ - PHP_METHOD(vtiful_xls, data) - { -- zend_ulong column_index = 0; -+ zend_ulong column_index = 0, index; -+ zend_string *key; - zval *data = NULL, *data_r_value = NULL; - - ZEND_PARSE_PARAMETERS_START(1, 1) -@@ -651,17 +652,16 @@ PHP_METHOD(vtiful_xls, data) - - column_index = 0; - -- ZEND_HASH_FOREACH_BUCKET(Z_ARRVAL_P(data_r_value), Bucket *bucket) -+ ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(data_r_value), index, key, data) { - // numeric index rewriting -- if (bucket->key == NULL) { -- column_index = bucket->h; -+ if (key == NULL) { -+ column_index = index; - } -- -- type_writer(&bucket->val, SHEET_CURRENT_LINE(obj), column_index, &obj->write_ptr, NULL, obj->format_ptr.format); -+ type_writer(data, SHEET_CURRENT_LINE(obj), column_index, &obj->write_ptr, NULL, obj->format_ptr.format); - - // next number index - ++column_index; -- ZEND_HASH_FOREACH_END(); -+ } ZEND_HASH_FOREACH_END(); - - SHEET_LINE_ADD(obj) - ZEND_HASH_FOREACH_END(); |