WordPress.org

Make WordPress Core

Ticket #10861: 10861_cache.patch

File 10861_cache.patch, 1.2 KB (added by hakre, 9 years ago)
  • wp-includes/cache.php

     
    412412        }
    413413
    414414        /**
    415          * PHP4 constructor; Calls PHP 5 style constructor
     415         * PHP4 constructor
    416416         *
    417417         * @since 2.0.0
    418418         *
    419419         * @return WP_Object_Cache
    420420         */
    421421        function WP_Object_Cache() {
    422                 return $this->__construct();
     422//              construct is an empty function and therefore commented:
     423//              $this->__construct();
    423424        }
    424425
    425426        /**
    426          * Sets up object properties; PHP 5 style constructor
     427         * constructor
    427428         *
    428429         * @since 2.0.8
    429          * @return null|WP_Object_Cache If cache is disabled, returns null.
     430         * @return WP_Object_Cache
    430431         */
    431         function __construct() {
    432                 /**
    433                  * @todo This should be moved to the PHP4 style constructor, PHP5
    434                  * already calls __destruct()
    435                  */
    436                 register_shutdown_function(array(&$this, "__destruct"));
    437         }
    438 
    439         /**
    440          * Will save the object cache before object is completely destroyed.
    441          *
    442          * Called upon object destruction, which should be when PHP ends.
    443          *
    444          * @since  2.0.8
    445          *
    446          * @return bool True value. Won't be used by PHP
    447          */
    448         function __destruct() {
    449                 return true;
    450         }
     432        function __construct() {}
    451433}
    452434?>