Skip to content

Commit 191fc7c

Browse files
adaudenthunAntoine Daudenthun
authored andcommitted
unregister phar only when appropriate
Calling stream_wrapper_unregister('phar') without checking if it's registered will trigger a warning
1 parent 62ae101 commit 191fc7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/bootstrap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* Environment initialization
99
*/
1010
error_reporting(E_ALL);
11-
stream_wrapper_unregister('phar');
11+
if (in_array('phar', \stream_get_wrappers())) {
12+
stream_wrapper_unregister('phar');
13+
}
1214
#ini_set('display_errors', 1);
1315

1416
/* PHP version validation */

0 commit comments

Comments
 (0)