Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Smart Search and PHP7

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #41  
Old 04-18-2018, 10:15 AM
 
acrotech acrotech is offline
 

Advanced Member
  
Join Date: Aug 2008
Location: NY, USA
Posts: 35
 

Default Re: Smart Search and PHP7

$search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript
"'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags
"'([\r\n])[\s]+'", // Strip out white space
"'&(quot|#34);'i", // Replace HTML entities
"'&(amp|#3;'i",
"'&(lt|#60);'i",
"'&(gt|#62);'i",
"'&(nbsp|#160);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'&#(\d+);'e");

if ($search && $string){
return preg_replace($search, ' ', $string);
} else {
return false;
}

I believe, the issue is in the above code - 'e"

Here is the error -
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /.../modules/Smart_Search/smart_search_functions.php on line 319

The search does not return anything.
__________________
xcart classic
4.7.12 Platinum
php 7.x
Reply With Quote
  #42  
Old 04-19-2018, 11:23 AM
  BCSE's Avatar 
BCSE BCSE is online now
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,060
 

Default Re: Smart Search and PHP7

I think the 'e' is a mistake, but this is untested.

I would replace this line:
"'&#(\d+);'e");

With this:
"'&#(\d+);'");

Try it and let us know.

thanks

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #43  
Old 04-19-2018, 12:41 PM
 
acrotech acrotech is offline
 

Advanced Member
  
Join Date: Aug 2008
Location: NY, USA
Posts: 35
 

Default Re: Smart Search and PHP7

Thanks Carrie - that seems to work. There are some other minor kinks - once we resolve them - we should be able to move to php7.
thanks
__________________
xcart classic
4.7.12 Platinum
php 7.x
Reply With Quote
  #44  
Old 04-25-2018, 08:43 AM
  BCSE's Avatar 
BCSE BCSE is online now
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,060
 

Default Re: Smart Search and PHP7

Quote:
Originally Posted by acrotech
Thanks Carrie - that seems to work. There are some other minor kinks - once we resolve them - we should be able to move to php7.
thanks

You're very welcome! Glad it helped!

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:14 PM.

   

 
X-Cart forums © 2001-2020