Error message in modules.php
-
Hello!
There is an error that occurs when a non-newsletter user tries to access the newsletter profile page.
Notice: Trying to get property 'token' of non-object in /customers/e/0/e/[redacted]/httpd.www/wp-content/plugins/newsletter/includes/module.php on line 952
The line 952 has the check:
if($token != $user->token)
which throws as error since $user isn’t set when there’s no newsletter user.Until it’s fixed, I added and extra if statement to check if $user is set to prevent the error message being shown.
if(isset($user)){ if ($token != $user->token) { $user = null; } } else{ $user = null; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Error message in modules.php’ is closed to new replies.