Ejegg has submitted this change and it was merged.

Change subject: WIP fixes for testing
......................................................................


WIP fixes for testing

TODO:
* Research upstream, are we the only ones running phpunit?  Or missing a 
bootstrap level?

Change-Id: I04157cdaf382d8cced89dc097d9903674e8470df
---
A .version-stamp
M modules/user/user.module
2 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.version-stamp b/.version-stamp
new file mode 120000
index 0000000..96ad3c8
--- /dev/null
+++ b/.version-stamp
@@ -0,0 +1 @@
+../.version-stamp
\ No newline at end of file
diff --git a/modules/user/user.module b/modules/user/user.module
index 9668d3b..05d7b7e 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -798,6 +798,10 @@
     $account = $user;
   }
 
+  if (!is_object($account)) {
+    return FALSE;
+  }
+
   // User #1 has all privileges:
   if ($account->uid == 1) {
     return TRUE;
@@ -1542,7 +1546,7 @@
  *   TRUE if the user is logged in, FALSE if the user is anonymous.
  */
 function user_is_logged_in() {
-  return (bool) $GLOBALS['user']->uid;
+  return $GLOBALS['user'] && (bool) $GLOBALS['user']->uid;
 }
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/149655
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I04157cdaf382d8cced89dc097d9903674e8470df
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/drupal
Gerrit-Branch: master
Gerrit-Owner: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to