When the library function where2indexedArray($where) is called with $where containing tabs and/or newlines, it sometimes generates error:
"Cannot extract token from ..."
Such error could be avoided by being careful not to use tabs and newlines in the $where string. However, this results in reduced readability of source code, especially with complex $where conditions. So, would like to propose to add one line in function where2indexedArray($where), as follows:
...
$input = $where;
// Add this line to solve "Cannot extract token from" error:
$where = preg_replace("/\s\s+/", " ", $where);
$output = array();
while (!empty($where)) {
...
[Updated on: Sun, 26 October 2014 09:35]
Report message to a moderator