WordPress.org

Make WordPress Core

Ticket #3354: openid2.patch

File openid2.patch, 790 bytes (added by hvdkamer, 11 years ago)

Fix to correct problem in cache.php

  • wp-includes/cache.php

    diff -urN wordpress_213/wp-includes/cache.php wordpress_213.hk/wp-includes/cache.php
    old new  
    2929function wp_cache_get($id, $flag = '') {
    3030        global $wp_object_cache;
    3131
     32        if (!is_object($wp_object_cache)) {
     33                $wp_object_cache = new WP_Object_Cache();
     34        }
     35
    3236        return $wp_object_cache->get($id, $flag);
    3337}
    3438
     
    188192        function load_group_from_db($group) {
    189193                global $wpdb;
    190194
     195                if (!is_object($wpdb)) {
     196                        $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
     197                }
     198
    191199                if ('category' == $group) {
    192200                        $this->cache['category'] = array ();
    193201                        if ($dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories")) {