Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 159
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 145
Total: 145

Author Topic: Error after php upgrade  (Read 926 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: 16452
    • 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: 16452
    • 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
37 Replies
26061 Views
Last post December 27, 2007, 10:22:10 pm
by SMFHacks
2 Replies
3687 Views
Last post October 02, 2009, 06:59:00 pm
by SMFHacks
4 Replies
5680 Views
Last post November 17, 2013, 08:42:19 pm
by dan42101
1 Replies
1282 Views
Last post July 30, 2021, 09:11:45 pm
by SMFHacks
2 Replies
548 Views
Last post October 31, 2022, 10:49:56 am
by Gus

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal