Skip to content

Commit e3c02b3

Browse files
authored
Merge pull request #325 from viest/dev
Fix: #324
2 parents cd219d1 + d4c1503 commit e3c02b3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

kernel/excel.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,16 @@ PHP_METHOD(vtiful_xls, openFile)
11211121

11221122
xls_object* obj = Z_XLS_P(getThis());
11231123

1124+
if (obj->read_ptr.file_t != NULL) {
1125+
xlsxioread_close(obj->read_ptr.file_t);
1126+
obj->read_ptr.file_t = NULL;
1127+
}
1128+
1129+
if (obj->read_ptr.sheet_t != NULL) {
1130+
xlsxioread_sheet_close(obj->read_ptr.sheet_t);
1131+
obj->read_ptr.sheet_t = NULL;
1132+
}
1133+
11241134
obj->read_ptr.file_t = file_open(Z_STRVAL_P(zv_config_path), ZSTR_VAL(zs_file_name));
11251135
}
11261136
/* }}} */

0 commit comments

Comments
 (0)