Skip to content

Commit d2470f3

Browse files
committed
Fix attribute persist
1 parent ce9e167 commit d2470f3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ext/opcache/zend_persist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ static HashTable *zend_persist_attributes(HashTable *attributes)
278278
zend_accel_store_interned_string(copy->lcname);
279279

280280
for (i = 0; i < copy->argc; i++) {
281-
zend_accel_store_interned_string(copy->args[i].name);
281+
if (copy->args[i].name) {
282+
zend_accel_store_interned_string(copy->args[i].name);
283+
}
282284
zend_persist_zval(&copy->args[i].value);
283285
}
284286

ext/opcache/zend_persist_calc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ static void zend_persist_attributes_calc(HashTable *attributes)
165165
ADD_INTERNED_STRING(attr->lcname);
166166

167167
for (i = 0; i < attr->argc; i++) {
168-
ADD_INTERNED_STRING(attr->args[i].name);
168+
if (attr->args[i].name) {
169+
ADD_INTERNED_STRING(attr->args[i].name);
170+
}
169171
zend_persist_zval_calc(&attr->args[i].value);
170172
}
171173
} ZEND_HASH_FOREACH_END();

0 commit comments

Comments
 (0)