From: Dmitry Stogov Date: Thu, 28 Jan 2021 13:38:36 +0000 (+0300) Subject: Remove useless zend_update_class_constants() calls X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c83cbc52a0f24dfbe7e0b6b2f4395e65cc926f20;p=php Remove useless zend_update_class_constants() calls --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index f8175493ab..073965db71 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -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;