Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jul 2007
    Location
    Victor Harbor, SA
    Posts
    11
    Plugin Contributions
    0

    Default [Not a core ZC bug] Search returning invalid keyword error

    Zen 1.38a running on php 5.2.9 and MySql 5.081 Community

    The search in the store continually returned "Invalid keyword" messages no matter what the input.
    I searched but could find no reference.

    After a day and a half of frustration and eventually with the help of the Debug Error Logging Utility - thank you, DrByte - I found the following error every time the search was run:
    [18-Nov-2009 20:42:34] PHP Warning: preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Unknown modifier '+'
    in /home/<mysite>/public_html/includes/functions/functions_general.php on line 235

    This is the code there:
    $pieces = preg_split('[[:space:]]+', $search_str);

    Did some research and finally added '/' delimiters around the left square bracket and the plus sign and the error went away and the search functioned as it should.

    The code now looks like this:
    $pieces = preg_split('/[[:space:]]+/', $search_str);

    The file was the stock standard 1.38a one so I'm guessing it's some setting in php or something, causing this.

    Hope this might be of some help to someone.

    grantgee.
    Last edited by grantgee; 18 Nov 2009 at 10:22 PM.

 

 

Similar Threads

  1. v154 [Not a bug] /** CDN for jQuery core **/
    By rbarbour in forum Bug Reports
    Replies: 10
    Last Post: 4 Mar 2015, 03:24 AM
  2. [Not a ZC core bug] Swedish Weekday in product_info
    By FrilansReklam in forum Bug Reports
    Replies: 2
    Last Post: 27 Feb 2013, 07:39 PM
  3. v150 [Not a ZC core bug] ckeditor.php addon calls insecure site
    By The Other Air Force in forum Bug Reports
    Replies: 0
    Last Post: 22 Mar 2012, 03:53 AM
  4. Search/Advanced Search not returning results
    By scottfr in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 6 Apr 2011, 06:08 AM
  5. Search and Advanced search not returning results
    By paisore in forum General Questions
    Replies: 6
    Last Post: 4 Nov 2010, 03:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg