if is not a string but 0, the comparsion == ->autoinc_id is true, which leads to an SQL Query error, if an extra column is used in sorting/filtering together with the lettersearch

This commit is contained in:
Klaus Leithoff 2010-05-28 11:08:36 +00:00
parent f6e2163b91
commit 3d99f3e9b3

View File

@ -488,7 +488,7 @@ class so_sql_cf extends so_sql
foreach($filter as $name => $val) foreach($filter as $name => $val)
{ {
// replace ambiguous auto-id with (an exact match of) table_name.autoid // replace ambiguous auto-id with (an exact match of) table_name.autoid
if ($name == $this->autoinc_id) if (is_string($name) && $name == $this->autoinc_id)
{ {
if ((int)$filter[$this->autoinc_id]) if ((int)$filter[$this->autoinc_id])
{ {