Skip to content

fix bug #72884 isCloneable() on SplFileObject should return false#4688

Closed
jhdxr wants to merge 3 commits intophp:PHP-7.2from
jhdxr:bugfix/72884
Closed

fix bug #72884 isCloneable() on SplFileObject should return false#4688
jhdxr wants to merge 3 commits intophp:PHP-7.2from
jhdxr:bugfix/72884

Conversation

@jhdxr
Copy link
Member

@jhdxr jhdxr commented Sep 8, 2019

I removed the clone_obj handler on SplFileObject so isCloneable() is able to return false now.
please noted I didn't remove the codes rasing error in spl_filesystem_object_clone since there might be extensions reusing this method.

@nikic
Copy link
Member

nikic commented Sep 8, 2019

please noted I didn't remove the codes rasing error in spl_filesystem_object_clone since there might be extensions reusing this method.

This is a static function, so I don't think we need to be concerned about it. I'd suggest replacing this branch with a ZEND_ASSERT(0);.

@jhdxr
Copy link
Member Author

jhdxr commented Sep 8, 2019

I'd suggest replacing this branch with a ZEND_ASSERT(0);.

Good idea. Changed as suggested.

@nikic
Copy link
Member

nikic commented Sep 9, 2019

Merged as 1ac6b02 into 7.2+. Thanks!

@nikic nikic closed this Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants