]> granicus.if.org Git - php/commitdiff
Fix incorrect zend_try usage
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 10 Dec 2019 14:22:31 +0000 (15:22 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 10 Dec 2019 14:22:31 +0000 (15:22 +0100)
ext/opcache/ZendAccelerator.c

index 3f65123aed6c2f888c78eece9cd001532c0a7420..0b66ab6e6e25d778f5b6eb6a0f14b16a9eb32b11 100644 (file)
@@ -3873,10 +3873,13 @@ static void preload_check_windows_restrictions(zend_class_entry *scope) {
 static inline int preload_update_class_constants(zend_class_entry *ce) {
        /* This is a separate function to work around what appears to be a bug in GCC
         * maybe-uninitialized analysis. */
+       int result;
        zend_try {
-               return zend_update_class_constants(ce);
+               result = zend_update_class_constants(ce);
+       } zend_catch {
+               result = FAILURE;
        } zend_end_try();
-       return FAILURE;
+       return result;
 }
 
 static zend_class_entry *preload_load_prop_type(zend_property_info *prop, zend_string *name) {