Fixed bin proxies on PHP < 8 to support stream_seek (#10468)
parent
6a70161c01
commit
db64534b26
|
@ -333,6 +333,16 @@ if (PHP_VERSION_ID < 80000) {
|
||||||
return \$operation ? flock(\$this->handle, \$operation) : true;
|
return \$operation ? flock(\$this->handle, \$operation) : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function stream_seek(\$offset, \$whence)
|
||||||
|
{
|
||||||
|
if (0 === fseek(\$this->handle, \$offset, \$whence)) {
|
||||||
|
\$this->position = ftell(\$this->handle);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function stream_tell()
|
public function stream_tell()
|
||||||
{
|
{
|
||||||
return \$this->position;
|
return \$this->position;
|
||||||
|
|
Loading…
Reference in New Issue