Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OsC 2.3.4BS Configuration: MAX_DISPLAY_.. must be >0


Denkster

Recommended Posts

Dear friends,
I found that in the table Configuration the values of all Configuration_key starting with MAX_DISPLAY_..
must be set >0.
Or else you get a divide by zero error from
/catalog/includes/classes/split_page_results.php line 57:

$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

It would be nice if the code prevented that error..

 

Those are the relevant  keys (I recon):

MAX_DISPLAY_SEARCH_RESULTS,

MAX_DISPLAY_PAGE_LINKS,

MAX_DISPLAY_MANUFACTURERS_IN_A_LIST,

MAX_DISPLAY_NEW_REVIEWS,

MAX_DISPLAY_SPECIAL_PRODUCTS,

MAX_DISPLAY_PRODUCTS_NEW,

MAX_DISPLAY_BESTSELLERS,

MAX_DISPLAY_ALSO_PURCHASED,

MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX,

MAX_DISPLAY_ORDER_HISTORY,

 

just a heads up..

Eveline

Link to comment
Share on other sites

All these values (except MAX_DISPLAY_MANUFACTURERS_IN_A_LIST, which is a special case) have non zero initial values, so using a 0 is a blunder by the store administrator. That said, perhaps something could be done to either prevent the entry/update of a value less than 1, or at run-time check if the value is less than 1 and use some reasonable default. The database field is "TEXT", so the entered value should be checked to be an integer, too.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...