]> granicus.if.org Git - php/commitdiff
Remove useless zend_update_class_constants() calls
authorDmitry Stogov <dmitry@zend.com>
Thu, 28 Jan 2021 13:38:36 +0000 (16:38 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 28 Jan 2021 13:38:36 +0000 (16:38 +0300)
ext/spl/spl_directory.c

index f8175493ab2ebf262b7ec9619f1579893dff88df..073965db71f8188af83a6b54dc84dfdaf6cf07cf 100644 (file)
@@ -458,8 +458,6 @@ static spl_filesystem_object *spl_filesystem_object_create_info(spl_filesystem_o
 
        ce = ce ? ce : source->info_class;
 
-       zend_update_class_constants(ce);
-
        intern = spl_filesystem_from_obj(spl_filesystem_object_new_ex(ce));
        RETVAL_OBJ(&intern->std);
 
@@ -497,10 +495,6 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp
                case SPL_FS_INFO:
                        ce = ce ? ce : source->info_class;
 
-                       if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
-                               return NULL;
-                       }
-
                        intern = spl_filesystem_from_obj(spl_filesystem_object_new_ex(ce));
                        RETVAL_OBJ(&intern->std);
 
@@ -523,10 +517,6 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp
                {
                        ce = ce ? ce : source->file_class;
 
-                       if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
-                               return NULL;
-                       }
-
                        char *open_mode = "r";
                        size_t open_mode_len = 1;
                        zval *resource = NULL;