No Code Attached Yet bug
avatar toivo
toivo
21 Sep 2022

Steps to reproduce the issue

Set up MFA for the user group Registered.
Get a user to register and set up MFA.
Enable the plugin System - Privacy Consent.
Get the user to login.

Expected result

The login succeeds and MFA is prompted

Actual result

An infinite loop starts with Deprecated messages for lines 304-307 of privacyconsent.php:

Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\plugins\system\privacyconsent\privacyconsent.php on line 304

The redirection URL is change-password?view=captive

The call stack is attached.

System information (as much as possible)

Wampserver 3.2.9 in Windows 11
PHP 8.1.9
MySQL 8.0.27

Additional comments

Call stack
( ! ) Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\plugins\system\privacyconsent\privacyconsent.php on line 304
Call Stack

Time Memory Function Location

1 0.0000 364504 {main}( ) ...\index.php:0
2 0.0001 365256 require_once( 'C:\www\joomla4test\includes\app.php ) ...\index.php:32
3 0.0033 1079608 Joomla\CMS\Application\CMSApplication->execute( ) ...\app.php:61
4 0.0035 1172264 Joomla\CMS\Application\SiteApplication->doExecute( ) ...\CMSApplication.php:294
5 0.0514 2029896 Joomla\CMS\Application\SiteApplication->route( ) ...\SiteApplication.php:224
6 0.0543 2119536 Joomla\CMS\Application\WebApplication->triggerEvent( $eventName = 'onAfterRoute', $args = ??? ) ...\SiteApplication.php:780
7 0.0543 2119632 Joomla\Event\Dispatcher->dispatch( $name = 'onAfterRoute', $event = class Joomla\Event\Event { protected $name = 'onAfterRoute'; protected $arguments = []; protected $stopped = FALSE } ) ...\EventAware.php:107
8 0.0543 2121480 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure:C:\www\joomla4test\libraries\src\Plugin\CMSPlugin.php:263-289}( $event = class Joomla\Event\Event { protected $name = 'onAfterRoute'; protected $arguments = []; protected $stopped = FALSE } ) ...\Dispatcher.php:486
9 0.0543 2121480 PlgSystemPrivacyconsent->onAfterRoute( ) ...\CMSPlugin.php:279
10 0.0548 2144072 substr( $string = NULL, $offset = 0, $length = 8 ) ...\privacyconsent.php:304

avatar toivo toivo - open - 21 Sep 2022
avatar toivo toivo - change - 21 Sep 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 21 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Sep 2022
avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023
avatar Hackwar Hackwar - change - 24 Nov 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-11-24 23:20:12
Closed_By Hackwar
avatar Hackwar Hackwar - close - 24 Nov 2024
avatar Hackwar
Hackwar - comment - 24 Nov 2024

I created a PR #44522 to fix this. Please test. Since we have a PR, I'm closing this one.

Add a Comment

Login with GitHub to post a comment