Skip to content
Snippets Groups Projects
Verified Commit f83b9368 authored by Juraj Nemec's avatar Juraj Nemec
Browse files

Issue #3273723 by djdevin, loopy1492, swim: fopen() error in stream_wrappers.inc on PHP 8

parent ee2a2c7f
No related branches found
No related tags found
1 merge request!7330Issue #3306390 by poker10, catch, Fabianx, pwolanin, rvtraveller: [D7]...
......@@ -405,6 +405,12 @@ protected function getLocalPath($uri = NULL) {
public function stream_open($uri, $mode, $options, &$opened_path) {
$this->uri = $uri;
$path = $this->getLocalPath();
if ($path === FALSE) {
if ($options & STREAM_REPORT_ERRORS) {
trigger_error('stream_open() filename cannot be empty', E_USER_WARNING);
}
return FALSE;
}
$this->handle = ($options & STREAM_REPORT_ERRORS) ? fopen($path, $mode) : @fopen($path, $mode);
if ((bool) $this->handle && $options & STREAM_USE_PATH) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment