Guillaume Beaudoin has uploaded a new change for review.
https://gerrit.wikimedia.org/r/52622
Change subject: (Bug 38135) Workaround a Fatal error
......................................................................
(Bug 38135) Workaround a Fatal error
Change-Id: I882cd56a63ff4709a6db6e11b995c41aa14a393a
---
M LdapAuthentication.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LdapAuthentication
refs/changes/22/52622/1
diff --git a/LdapAuthentication.php b/LdapAuthentication.php
index be81879..1fb1afd 100644
--- a/LdapAuthentication.php
+++ b/LdapAuthentication.php
@@ -1133,7 +1133,8 @@
}
# If the session domain isn't set, the user may have been logged
# in with a token, check the user options.
- if ( $wgUser->isLoggedIn() && $wgUser->getToken( false ) ) {
+ # If $wgUser isn't defined yet, it might be due to an
LDAPAutoAuthDomain config.
+ if ( defined($wgUser) && $wgUser->isLoggedIn() &&
$wgUser->getToken( false ) ) {
$this->printDebug( "Pulling domain from user options.",
NONSENSITIVE );
$domain = self::loadDomain( $wgUser );
if ( $domain ) {
--
To view, visit https://gerrit.wikimedia.org/r/52622
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I882cd56a63ff4709a6db6e11b995c41aa14a393a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LdapAuthentication
Gerrit-Branch: master
Gerrit-Owner: Guillaume Beaudoin <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits