Skip to content

Commit 75fb094

Browse files
committed
fixup! fix: Harden files scanner for invalid null access
1 parent 47f30a6 commit 75fb094

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/private/Files/View.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,13 +610,13 @@ public function file_put_contents($path, $data) {
610610
$this->lockFile($path, ILockingProvider::LOCK_SHARED);
611611

612612
$exists = $this->file_exists($path);
613-
$run = true;
614613
if ($this->shouldEmitHooks($path)) {
614+
$run = true;
615615
$this->emit_file_hooks_pre($exists, $path, $run);
616-
}
617-
if (!$run) {
618-
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
619-
return false;
616+
if (!$run) {
617+
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
618+
return false;
619+
}
620620
}
621621

622622
try {

0 commit comments

Comments
 (0)