mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 16:44:07 +02:00
No need to check if isset since we're creating the context ourselves
This commit is contained in:
parent
5aae45f2dd
commit
a96e4754f7
1 changed files with 3 additions and 3 deletions
|
|
@ -72,13 +72,13 @@ class CallbackWrapper extends Wrapper {
|
||||||
public function stream_open($path, $mode, $options, &$opened_path) {
|
public function stream_open($path, $mode, $options, &$opened_path) {
|
||||||
$context = $this->loadContext('callback');
|
$context = $this->loadContext('callback');
|
||||||
|
|
||||||
if (isset($context['read']) and is_callable($context['read'])) {
|
if (is_callable($context['read'])) {
|
||||||
$this->readCallback = $context['read'];
|
$this->readCallback = $context['read'];
|
||||||
}
|
}
|
||||||
if (isset($context['write']) and is_callable($context['write'])) {
|
if (is_callable($context['write'])) {
|
||||||
$this->writeCallback = $context['write'];
|
$this->writeCallback = $context['write'];
|
||||||
}
|
}
|
||||||
if (isset($context['close']) and is_callable($context['close'])) {
|
if (is_callable($context['close'])) {
|
||||||
$this->closeCallback = $context['close'];
|
$this->closeCallback = $context['close'];
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue