mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 16:44:07 +02:00
We already the checks earlier
This commit is contained in:
parent
e2e41824dc
commit
5aae45f2dd
1 changed files with 1 additions and 6 deletions
|
|
@ -116,12 +116,7 @@ class IteratorDirectory implements Directory {
|
||||||
throw new \BadMethodCallException('$source should be an Iterator or array');
|
throw new \BadMethodCallException('$source should be an Iterator or array');
|
||||||
}
|
}
|
||||||
stream_wrapper_register('iterator', '\Icewind\Streams\IteratorDirectory');
|
stream_wrapper_register('iterator', '\Icewind\Streams\IteratorDirectory');
|
||||||
try {
|
|
||||||
$wrapped = opendir('iterator://', $context);
|
$wrapped = opendir('iterator://', $context);
|
||||||
} catch (\BadMethodCallException $e) {
|
|
||||||
stream_wrapper_unregister('iterator');
|
|
||||||
throw $e;
|
|
||||||
}
|
|
||||||
stream_wrapper_unregister('iterator');
|
stream_wrapper_unregister('iterator');
|
||||||
return $wrapped;
|
return $wrapped;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue