Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4341
Latest: jmac32here
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 44306
Total Topics: 7676
Most Online Today: 293
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 137
Total: 137

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

0 Members and 1 Guest are viewing this topic.

Undefined variable: user_info
« on: »
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

Re: Undefined variable: user_info
« Reply #1 on: »
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/

Re: Undefined variable: user_info
« Reply #2 on: »
Yes here it is :)

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

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

Re: Undefined variable: user_info
« Reply #3 on: »
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/

Re: Undefined variable: user_info
« Reply #4 on: »
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

Re: Undefined variable: user_info
« Reply #5 on: »
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/

Re: Undefined variable: user_info
« Reply #6 on: »
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
18528 Views
Last post December 27, 2006, 02:15:03 pm
by pvisser
5 Replies
9404 Views
Last post January 19, 2007, 11:13:02 pm
by Tim
0 Replies
6851 Views
Last post February 03, 2008, 04:48:20 pm
by keithsnell
0 Replies
3969 Views
Last post April 21, 2009, 06:46:26 pm
by drhamad
5 Replies
6736 Views
Last post January 10, 2010, 12:45:58 pm
by SMFHacks

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal