Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Deprecated: Function ereg() is deprecated in ...advanced_search_result.php on line 271


lmickol

Recommended Posts

Using QPBPP and the advanced search function... When trying to search for something... I have encountered the following error in my code after upgrading to 2.3.3. The web isnt being very helpful in helping me fix my problem so i figured id post here... line 271 says this:

 

 

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

if ($column_list[$i] == 'PRODUCT_LIST_NAME') {

$HTTP_GET_VARS['sort'] = $i+1 . 'a';

$order_str = ' order by pd.products_name';

break;

}

}

 

THANKS!

Link to comment
Share on other sites

Make a backup then try:

 

if ( (!isset($GET['sort'])) || (!preg_match('[1-8][ad]', $GET['sort'])) || (substr($GET['sort'], 0, 1) > sizeof($column_list)) ) {
   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
    $GET['sort'] = $i+1 . 'a';
    $order_str = ' order by pd.products_name';
    break;
  }
   }

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

You forgot the delimiters. The first line of that should be something like:

 

if ( (!isset($GET['sort'])) || (!preg_match('/[1-8][ad]/i', $GET['sort'])) || (substr($GET['sort'], 0, 1) > sizeof($column_list)) ) {

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks Jim, Missed that one :)

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...