dont apply callback wrapper when fopen failed
This commit is contained in:
parent
1270c6800d
commit
2d63fd77de
|
@ -988,7 +988,7 @@ class View {
|
||||||
$this->updater->update($path, $extraParam);
|
$this->updater->update($path, $extraParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($operation === 'fopen') {
|
if ($operation === 'fopen' and $result) {
|
||||||
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
|
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
|
||||||
if (in_array('write', $hooks)) {
|
if (in_array('write', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
|
|
Loading…
Reference in New Issue