micetrap Posted May 25, 2011 Share Posted May 25, 2011 Many months ago, I upgraded and fixed the ereg issues, but I seemed to have missed one. Now, I can't recall how to fix this. I am getting the following error: Deprecated: Function ereg() is deprecated in /home/*****/public_html/shop/catalog/index.php on line 230 This is the code from index.php: } 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'; $listing_sql .= " order by pd.products_name"; break; } Can someone please tell me how to change this so it will function properly again? Link to comment Share on other sites More sharing options...
Guest Posted May 25, 2011 Share Posted May 25, 2011 if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/[1-8][ad]/i', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { Chris Link to comment Share on other sites More sharing options...
micetrap Posted May 25, 2011 Author Share Posted May 25, 2011 Chris, thank you!!!! That fixed it. I tried to search and find it, but had no luck. You've saved me a lot of time! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.