Skip to content

Commit

Permalink
Merge pull request #536 from viest/fix_527
Browse files Browse the repository at this point in the history
Update: format is empty in object_format
  • Loading branch information
viest authored Nov 10, 2024
2 parents 9f5c06e + f247572 commit db0c29d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kernel/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ lxw_format* object_format(xls_object *obj, zend_string *format, lxw_format *form
}

if (format != NULL && format_handle != NULL) {
if (format->len <= 0) {
return format_handle;
}

zend_string *_format_key = strpprintf(0, "%p|%s", format_handle, format->val);

void *exit_format = zend_hash_str_find_ptr(obj->formats_cache_ptr.maps, ZEND_STRL(_format_key->val));
Expand All @@ -136,6 +140,10 @@ lxw_format* object_format(xls_object *obj, zend_string *format, lxw_format *form
}

if (format != NULL) {
if (format->len <= 0) {
return NULL;
}

void *exit_format = zend_hash_str_find_ptr(obj->formats_cache_ptr.maps, ZEND_STRL(format->val));

if (exit_format != NULL) {
Expand Down

0 comments on commit db0c29d

Please sign in to comment.