From 2fbafeaa2741da28bab183a25a598982d94b46e3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 20 Oct 2016 09:07:31 +0200 Subject: [PATCH] add missing false-test mentioned by Scrutinizer --- api/src/Vfs/Sqlfs/StreamWrapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Vfs/Sqlfs/StreamWrapper.php b/api/src/Vfs/Sqlfs/StreamWrapper.php index dd95c96d12..96a1ee205e 100644 --- a/api/src/Vfs/Sqlfs/StreamWrapper.php +++ b/api/src/Vfs/Sqlfs/StreamWrapper.php @@ -1906,9 +1906,9 @@ class StreamWrapper extends Api\Db\Pdo implements Vfs\StreamWrapperIface { $props = $props[$row['fs_id']] ? $props[$row['fs_id']] : array(); // return empty array for no props } - elseif ($props && isset($stat)) // need to map fs_id's to pathes + elseif ($props && isset($stat) && ($id2path = self::id2path(array_keys($props)))) // need to map fs_id's to pathes { - foreach(self::id2path(array_keys($props)) as $id => $path) + foreach($id2path as $id => $path) { $props[$path] =& $props[$id]; unset($props[$id]);