Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Unexpected "Cannot extract token from" Error Due to Tabs / Newlines
Unexpected "Cannot extract token from" Error Due to Tabs / Newlines [message #4605] Sun, 26 October 2014 09:20 Go to previous message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unexpected "Query was empty" Error Due to Space / Newline
Next Topic: Semicolon in Strings within SQL Multi Query String
Goto Forum:
  


Current Time: Sun Apr 28 08:30:19 EDT 2024

Total time taken to generate the page: 0.01168 seconds