diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-09 17:29:39 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-09 17:29:39 +0200 |
commit | 3f2d5c612e11f519f48b0f624190978dd1b5fc8b (patch) | |
tree | fbd41ea6737f6b40f84fd4816118b5a8bd99f938 /ext/spl/spl_directory.c | |
parent | 73ede6911d49dc245fcc2e56fc5636fc9b51e96a (diff) | |
parent | 1ac6b0251b6585490dfb549eb70b8c618cf90913 (diff) | |
download | php-git-3f2d5c612e11f519f48b0f624190978dd1b5fc8b.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'ext/spl/spl_directory.c')
-rw-r--r-- | ext/spl/spl_directory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index efcfd63cf1..7a91054fc4 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -379,8 +379,7 @@ static zend_object *spl_filesystem_object_clone(zval *zobject) intern->u.dir.index = index; break; case SPL_FS_FILE: - zend_throw_error(NULL, "An object of class %s cannot be cloned", ZSTR_VAL(old_object->ce->name)); - return new_object; + ZEND_ASSERT(0); } intern->file_class = source->file_class; @@ -3141,6 +3140,7 @@ PHP_MINIT_FUNCTION(spl_directory) REGISTER_SPL_IMPLEMENTS(RecursiveDirectoryIterator, RecursiveIterator); memcpy(&spl_filesystem_object_check_handlers, &spl_filesystem_object_handlers, sizeof(zend_object_handlers)); + spl_filesystem_object_check_handlers.clone_obj = NULL; spl_filesystem_object_check_handlers.get_method = spl_filesystem_object_get_method_check; #ifdef HAVE_GLOB |