Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 11838
Latest: Paul7788
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 42415
Total Topics: 7393
Most Online Today: 52
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 59
Total: 59

Author Topic: Error after php upgrade  (Read 645 times)

0 Members and 1 Guest are viewing this topic.

Offline wargamesillustrated

  • Member
  • *
  • Posts: 6
    • View Profile
Error after php upgrade
« on: January 26, 2021, 04:32:35 am »
Hi there, our host has moved our forum to PHP 7.3 everything seems to be working ok but we have the error at the top of the site:

Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /homepages/7/d856305556/htdocs/leadadventureforum.com/public_html/Sources/adseller2.php on line 4351

Is this something that can be fixed?

Thank you

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16084
    • View Profile
Re: Error after php upgrade
« Reply #1 on: January 26, 2021, 01:45:25 pm »
This was fixed in an update.
Fixed function below
Code: [Select]
function AdSellerisMobileDevice()
{

$user_agents = array(
array('iPhone', 'iphone'),
array('iPod', 'ipod'),
array('iPad', 'ipad'),
array('PocketIE', 'iemobile'),
array('Opera Mini', isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) ?  'operamini' : ''),
array('Opera Mobile', 'Opera Mobi'),
array('Android', 'android'),
array('Symbian', 'symbian'),
array('BlackBerry', 'blackberry'),
array('BlackBerry Storm', 'blackberry05'),
array('Palm', 'palm'),
array('Web OS', 'webos'),
);

foreach ($user_agents as $ua)
{
$string = (string) $ua[1];

if (!empty($string))
if ((strpos(strtolower($_SERVER['HTTP_USER_AGENT']), $string)))
return true;
}

        return false;

}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline wargamesillustrated

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Error after php upgrade
« Reply #2 on: January 27, 2021, 12:37:06 pm »
Thank you, How do I apply this fix/ update?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16084
    • View Profile
Re: Error after php upgrade
« Reply #3 on: January 27, 2021, 01:01:47 pm »
You can either replace the function in sources/adseller2.php with the above new code.

Or purchase a renewal at a lower price for which has updates for another year as well
https://www.smfhacks.com/index.php?action=license
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
6162 Views
Last post April 12, 2007, 07:55:24 pm
by SMFHacks
37 Replies
24444 Views
Last post December 27, 2007, 10:22:10 pm
by SMFHacks
2 Replies
3118 Views
Last post October 02, 2009, 06:59:00 pm
by SMFHacks
4 Replies
4749 Views
Last post November 17, 2013, 08:42:19 pm
by dan42101
1 Replies
688 Views
Last post July 30, 2021, 09:11:45 pm
by SMFHacks

+- Recent Topics

Quick moderation checkboxes in search result? by SMFHacks
August 08, 2022, 10:37:03 am

Setting a single free download. by Zaphod
August 07, 2022, 10:39:26 am

Contact Page Mod Not Working by SMFHacks
August 05, 2022, 12:19:43 pm

Issues with new Newsletter Pro installation by SMFHacks
August 05, 2022, 07:15:18 am

SMFBlog Mod by Nicole
August 03, 2022, 09:46:22 pm

Contact Page by Nicole
August 03, 2022, 09:45:42 pm

trader + classifieds by Nicole
August 03, 2022, 05:05:17 pm

Category Permissions List by SMFHacks
July 30, 2022, 07:53:24 am

Some questions by mickjav
July 30, 2022, 03:31:07 am

prettyurls - TroubleShooting.wiki by SMFHacks
July 29, 2022, 12:27:28 pm

Powered by EzPortal