Labels |
Added:
?
|
Title |
|
Sorry for the mis information.
On debugging it looks like one of the mySites.guru tools (that is in development) had removed the setting value, but not removed the class property from JConfig
I have replicated again in Joomla 4 just now by setting public $root_user = null;
in global config.
I have replicated again in Joomla 3 just now by setting public $root_user = '';
in global config.
in Joomla 4 (as that's the code open on my screen) the check starts with
if (property_exists('\JConfig', 'root_user'))
thus explaining the behaviour Im seeing with null
and ''
@PhilETaylor Now saw the message in the admin login page of Joomla4 after using an empty root user in configuration.php: public $root_user = '';
Managed to get rid of the message in the above situation by adding a default value to the preceding get(), right or wrong:
// Safety check for when configuration.php root_user is in use.
$rootUser = $this->get('root_user', 'this-user-does-not-exist');
Maybe the should separate the two use cases more clearly, first when a Super User is already logged in and then when someone wants to login to the back end.
could just go for a smaller change (as 'this-user-does-not-exist'
might actually exist ;-) )
if (property_exists('\JConfig', 'root_user') && $rootuser)
This would then cover ""
, ''
, null
and false
:-)
You are right, that works but it would introduce a bug because the variable is not $rootuser
but $rootUser
;-)
if (property_exists('\JConfig', 'root_user') && $rootUser)
Ah well - blame typing the comment on iphone ;-)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-08 15:54:01 |
Closed_By | ⇒ | PhilETaylor |
@PhilETaylor unable to reproduce in an out-of-the-box Beta3-dev of 8 July with no patches applied. No luck in 3.9.19 either, the message is displayed only after I have logged in.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30051.