Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43260
Total Topics: 7518
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 278
Total: 279

Author Topic: Undefined variable: user_info  (Read 1338 times)

0 Members and 1 Guest are viewing this topic.

Offline Shades

  • Full Member
  • ***
  • Posts: 219
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Undefined variable: user_info
« on: March 28, 2022, 09:50:52 am »
SMF 2.1.1

Not sure what this error is all about! When a guest tried to register I got these errors:
Also posted this over at SMF: https://www.simplemachines.org/community/index.php?topic=581595.0

Quote
Error
Type of error
Undefined_vars
Error message
8: Undefined variable: user_info
File
/home2/******/public_html/******/Sources/Register.php
Line
525
URL of page causing the error
https://******.com/index.php?action=signup2

Backtrace information
#0: smf_error_handler()
Called from /home2/******/public_html/******/Sources/Register.php on line 525
#1: Register2()
Called from /home2/******/public_html/******/index.php on line 187

Quote
Error
Type of error
General
Error message
8: Trying to access array offset on value of type null
File
/home2/******/public_html/******/Sources/Register.php
Line
525
URL of page causing the error
https://******.com/index.php?action=signup2

Backtrace information
#0: smf_error_handler()
Called from /home2/******/public_html/******/Sources/Register.php on line 525
#1: Register2()
Called from /home2/******/public_html/******/index.php on line 187

Quote from: Doug Heffernan link=msg=4117886 date=1648476785
Can you post the code around line line 525 of the Register.php file?

Have you installed any mods recently btw before you noticed this error?
Last mods installed:

Stop Forum Spam 1.0 March 21, 2022, 09:55:25 PM
SMF Post Prefix    4.0.2 March 21, 2022, 03:14:01 PM
Tasks Manager    1.1.5 March 21, 2022, 02:48:21 PM

Register.php last modified on 02/09/2022

Line 525:
Quote
    if (!empty($modSettings['gdpr_enable_privacy_policy']) && !$user_info['is_admin'])

So looks like it might be an issue with GDPR Pro mod then?

Quote
Edit: GDPR Pro 2.0.6c Installed February 09, 2022, 05:24:33 PM

Quote
It looks like said mod can be the cause of the error. Can you see if the $user_info variable has been declaired as global in the mod code?

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Undefined variable: user_info
« Reply #1 on: March 28, 2022, 09:52:41 am »
Can you attach your Register.php file.
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 Shades

  • Full Member
  • ***
  • Posts: 219
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Undefined variable: user_info
« Reply #2 on: March 28, 2022, 09:56:09 am »
Yes here it is :)

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Undefined variable: user_info
« Reply #3 on: March 28, 2022, 10:10:37 am »
It looks like this was fixed in a later version of the mod. But required you do a complete uninstall of old then new one.


Fixed file attached though
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 Shades

  • Full Member
  • ***
  • Posts: 219
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Undefined variable: user_info
« Reply #4 on: March 28, 2022, 10:17:17 am »
It looks like this was fixed in a later version of the mod. But required you do a complete uninstall of old then new one.


Fixed file attached though

I have GDPR Pro 2.0.6d downloaded just for got to install it lol! ::)

Should I go ahead and update the mod to newest version or just replace the Register.php?

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Undefined variable: user_info
« Reply #5 on: March 28, 2022, 10:20:00 am »
If you install latest just uninstall old then install new.
Or keep the one you have and use the register.php change.
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 Shades

  • Full Member
  • ***
  • Posts: 219
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Undefined variable: user_info
« Reply #6 on: March 28, 2022, 10:21:16 am »
Ok thanks!

I'll just go ahead and update the mod! 8)

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

 

Related Topics

  Subject / Started by Replies Last post
19 Replies
16117 Views
Last post December 27, 2006, 02:15:03 pm
by pvisser
5 Replies
8010 Views
Last post January 19, 2007, 11:13:02 pm
by Tim
0 Replies
5935 Views
Last post February 03, 2008, 04:48:20 pm
by keithsnell
0 Replies
3087 Views
Last post April 21, 2009, 06:46:26 pm
by drhamad
5 Replies
5577 Views
Last post January 10, 2010, 12:45:58 pm
by SMFHacks

+- Recent Topics

No thumbnails on new uploads by Tonyvic
Today at 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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal