(bug 8999) User.php gives "undefined user editcount" PHP notice.
authorNick Jenkins <nickj@users.mediawiki.org>
Fri, 16 Feb 2007 06:54:13 +0000 (06:54 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Fri, 16 Feb 2007 06:54:13 +0000 (06:54 +0000)
RELEASE-NOTES
includes/User.php

index d5a66f3..3c9bebe 100644 (file)
@@ -191,6 +191,8 @@ lighter making things easier to read.
   MediaWiki:Disclaimers; Also means that if any of the footer links are
   disabled in the wiki's default language (by setting to "-"), they'll also
   be disabled in other languages too (e.g. if the user specifies uselang=fr).
+* (bug 8999) User.php gives "undefined user editcount" PHP notice.
+
 
 
 == Languages updated ==
index fb34100..6ad546d 100644 (file)
@@ -1593,7 +1593,7 @@ class User {
        /* Return the edit count for the user. This is where User::edits should have been */
        function getEditCount() {
                if ($this->mId) {
-                       if ($this->mEditCount === null ) {
+                       if ( !isset( $this->mEditCount ) ) {
                                /* Populate the count, if it has not been populated yet */
                                $this->mEditCount = User::edits($this->mId);
                        }