Skip to content

Error: Call to a member function getId() on null  #36

@dagosalas

Description

@dagosalas

I have implemented the plugin in several journals with OJS 3.3.0.11 , and I have started noticing that some users are not allowed to login.
Apache sends this:
[Fri Jan 13 09:38:59.278080 2023] [php7:error] [pid 19318] [client 148.234.16.165:56472] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /web/htdocs/revistas/innovaciones/lib/pkp/classes/notification/NotificationDAO.inc.php:216\nStack trace:\n#0 /web/htdocs/revistas/innovaciones/plugins/generic/betterPassword/features/ForceExpiration.inc.php(107): NotificationDAO->deleteObject(NULL)\n#1 /web/htdocs/revistas/innovaciones/plugins/generic/betterPassword/features/ForceExpiration.inc.php(65): ForceExpiration->_handleNotification(Object(User))\n#2 /web/htdocs/revistas/innovaciones/lib/pkp/classes/plugins/HookRegistry.inc.php(107): ForceExpiration->{closure}('LoadHandler', Array)\n#3 /web/htdocs/revistas/innovaciones/lib/pkp/classes/core/PKPPageRouter.inc.php(202): HookRegistry::call('LoadHandler', Array)\n#4 /web/htdocs/revistas/innovaciones/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route(Object(Request))\n#5 /web/htdocs/revistas/innovaciones/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#6 /web/htdocs/revistas/innovaciones/index.php(68 in /web/htdocs/revistas/innovaciones/lib/pkp/classes/notification/NotificationDAO.inc.php on line 216, referer: https://revistainnovaciones.uanl.mx/index.php/revin/login
The only way they can get in is (at this time) by leaving the password expiration option empty. It does allow the user to login but sends this error to the LOG:
[Fri Jan 13 09:46:44.212946 2023] [php7:warn] [pid 19566] [client 148.234.16.165:56551] PHP Warning: Invalid argument supplied for foreach() in /web/htdocs/revistas/innovaciones/plugins/generic/betterPassword/BetterPasswordSettingsForm.inc.php on line 126, referer: https://revistainnovaciones.uanl.mx/index.php/revin/management/settings/website

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions