|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2018-10-02 21:16 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: pollita
[2018-10-02 21:16 UTC] cmb@php.net
[2020-09-22 11:29 UTC] cmb@php.net
-Summary: stream_wrapper_restore works differently
before/after changes to the wrappers
+Summary: Inconsistent stream_wrapper_restore() errors
-Assigned To: pollita
+Assigned To: cmb
[2020-09-22 11:55 UTC] cmb@php.net
[2020-09-22 14:15 UTC] cmb@php.net
[2020-09-22 14:15 UTC] cmb@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ The stream_wrapper_restore() function behaves very differently before and after one of the stream_wrapper_(un)register functions was called. It returns different values and triggers different notices. Test script: --------------- <?php echo "\nrestore foo: "; var_dump(stream_wrapper_restore('foo')); echo "\nrestore phar: "; var_dump(stream_wrapper_restore('phar')); stream_wrapper_register('bar', 'stdClass'); echo "\nrestore foo: "; var_dump(stream_wrapper_restore('foo')); echo "\nrestore phar: "; var_dump(stream_wrapper_restore('phar')); Expected result: ---------------- restore foo: Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in … on line 3 bool(false) restore phar: Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in … on line 4 bool(true) restore foo: Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in … on line 8 bool(false) restore phar: Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in … on line 9 bool(true) Actual result: -------------- restore foo: Notice: stream_wrapper_restore(): foo:// was never changed, nothing to restore in … on line 3 bool(true) restore phar: Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in … on line 4 bool(true) restore foo: Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in … on line 8 bool(false) restore phar: bool(true)