Zen Cart Logo
Forums / Bug Reports / [Done 1.3.9f] split_page_result.php class "bug"

[Done 1.3.9f] split_page_result.php class "bug"

Locked

Views: 841

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
22 Jun 2010, 11:20 AM
#1
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

[Done 1.3.9f] split_page_result.php class "bug"

in file split_page_result.php is a following line:

$pos_from = strpos($query_lower, ' from', 0);

This get's the start position of the FROM part of a SQL query to replace anything before it with a count() code.

This will fail if the character before FROM isn't an empty space.

I Noticed this while quickly trying to put together a customized products page for a customer and the preceeding character was newline (\n) and thus the system failed. The needed space was inserted on the previous line before the newline.

Not very serious bug, if you can even call it one. But I don't think it's good practice to assume certain undocumented formating from SQL strings when providing such functions to "split pages".

Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004