mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 08:34:09 +02:00
Fix new loader
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
550e84e1cc
commit
064d01292a
1 changed files with 1 additions and 2 deletions
|
|
@ -56,7 +56,6 @@ class HashWrapper extends Wrapper {
|
||||||
public static function wrap($source, $hash, $callback) {
|
public static function wrap($source, $hash, $callback) {
|
||||||
$context = stream_context_create(array(
|
$context = stream_context_create(array(
|
||||||
'hash' => array(
|
'hash' => array(
|
||||||
'source' => $source,
|
|
||||||
'hash' => $hash,
|
'hash' => $hash,
|
||||||
'callback' => $callback,
|
'callback' => $callback,
|
||||||
)
|
)
|
||||||
|
|
@ -69,7 +68,7 @@ class HashWrapper 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();
|
||||||
$this->callback = $context['callback'];
|
$this->callback = $context['callback'];
|
||||||
$this->hashContext = hash_init($context['hash']);
|
$this->hashContext = hash_init($context['hash']);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue