Declare constant default values directly in the class definition and removed the...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 21 Dec 2011 18:53:00 +0000 (18:53 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 21 Dec 2011 18:53:00 +0000 (18:53 +0000)
includes/cache/LinkCache.php

index 785b19b..a73eaaa 100644 (file)
@@ -9,8 +9,10 @@ class LinkCache {
        // becomes incompatible with the new version.
        private $mClassVer = 4;
 
-       private $mGoodLinks, $mBadLinks;
-       private $mForUpdate;
+       private $mGoodLinks = array();
+       private $mGoodLinkFields = array();
+       private $mBadLinks = array();
+       private $mForUpdate = false;
 
        /**
         * Get an instance of this class
@@ -25,13 +27,6 @@ class LinkCache {
                return $instance;
        }
 
-       function __construct() {
-               $this->mForUpdate = false;
-               $this->mGoodLinks = array();
-               $this->mGoodLinkFields = array();
-               $this->mBadLinks = array();
-       }
-
        /**
         * General accessor to get/set whether SELECT FOR UPDATE should be used
         *