WordPress.org

Make WordPress Core

Ticket #21650: cache.php.21650.diff

File cache.php.21650.diff, 564 bytes (added by bobbingwide, 9 years ago)

Replace serialize() with print_r() to avoid Fatal error (WP 3.5)

  • wp-includes/cache.php

     
    578578                echo "</p>";
    579579                echo '<ul>';
    580580                foreach ($this->cache as $group => $cache) {
    581                         echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )</li>';
     581                        echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( print_r( $cache, true ) ) / 1024, 2 ) . 'k )</li>';
    582582                }
    583583                echo '</ul>';
    584584        }