dblayer : If provided select is not an array of array, throw an exception

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2274 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-09-12 14:51:21 +00:00
parent 6fec924d11
commit 56f7a1a0f0

View File

@@ -706,6 +706,8 @@ class dblayer
// TODO Allow a field=>value in plus of array("field","value")
foreach ($select as $n=>$s)
{
if (! is_array ($s))
throw new Exception ("Select not an array for element $n", 500);
// The foreign keys can not be in the select too (conflict)
if (in_array ($s[0],$foreignSelectCols))
continue;