fix SQLSTATE[42000]: Syntax error or access violation in filemanager

caused by not correctly quoted empty string instead of id in extended ACL
This commit is contained in:
Ralf Becker 2018-10-19 13:46:06 +02:00
parent 991812753d
commit 37f6c97441

View File

@ -1625,7 +1625,7 @@ GROUP BY A.fs_id';
}
}
// now search via the database
if (count($ids) > 1) array_map(function(&$v) { $v = (int)$v; },$ids);
if (count($ids) > 1) $ids = array_map(function($v) { return (int)$v; }, $ids);
$query = 'SELECT fs_id,fs_dir,fs_name FROM '.self::TABLE.' WHERE fs_id'.
(count($ids) == 1 ? '='.(int)$ids[0] : ' IN ('.implode(',',$ids).')');
if (self::LOG_LEVEL > 2) $query = '/* '.__METHOD__.': '.__LINE__.' */ '.$query;
@ -1913,7 +1913,7 @@ GROUP BY A.fs_id';
$id = $stat['ino'];
}
}
if (count($ids) >= 1) array_map(function(&$v) { $v = (int)$v; },$ids);
if (count($ids) >= 1) $ids = array_map(function($v) { return (int)$v; }, $ids);
$query = 'SELECT * FROM '.self::PROPS_TABLE.' WHERE (fs_id'.
(count($ids) == 1 ? '='.(int)implode('',$ids) : ' IN ('.implode(',',$ids).')').')'.
(!is_null($ns) ? ' AND prop_namespace=?' : '');