Skip to content

Commit c2d92ad

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix incorrect zend_try usage
2 parents fa18c11 + 5ddcaca commit c2d92ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,10 +3958,13 @@ static void preload_check_windows_restrictions(zend_class_entry *scope) {
39583958
static inline int preload_update_class_constants(zend_class_entry *ce) {
39593959
/* This is a separate function to work around what appears to be a bug in GCC
39603960
* maybe-uninitialized analysis. */
3961+
int result;
39613962
zend_try {
3962-
return zend_update_class_constants(ce);
3963+
result = zend_update_class_constants(ce);
3964+
} zend_catch {
3965+
result = FAILURE;
39633966
} zend_end_try();
3964-
return FAILURE;
3967+
return result;
39653968
}
39663969

39673970
static zend_class_entry *preload_load_prop_type(zend_property_info *prop, zend_string *name) {

0 commit comments

Comments
 (0)