WordPress.org

Forums

WP Super Cache
Fatal error: Cannot use object of type WP_Error as array...line 473 of Cach (2 posts)

  1. Dasha1000
    Member
    Posted 4 years ago #

    Hi,

    Just installed Super Cache and ran the test. Got the following message:

    Fatal error: Cannot use object of type WP_Error as array in .../wp-content/plugins/wp-super-cache/wp-cache.php on line 473

    This is line 473:
    if ( preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 'body' ], $matches1 ) &&

    The full section is:
    if ( preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 'body' ], $matches1 ) &&
    preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page2[ 'body' ], $matches2 ) && $matches1[2] == $matches2[2] ) {
    echo '<p>' . sprintf( __( 'Page 1: %s', 'wp-super-cache' ), $matches1[ 2 ] ) . '</p>';
    echo '<p>' . sprintf( __( 'Page 2: %s', 'wp-super-cache' ), $matches2[ 2 ] ) . '</p>';
    echo '<p>' . __( 'The timestamps on both pages match!', 'wp-super-cache' ) . '</p>';
    } else {
    echo '<p>' . __( 'The pages do not match! Timestamps differ or were not found!', 'wp-super-cache' ) . '</p>';

    Any advice?
    Thanks!

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 4 years ago #

    This is fixed in the development version (Look on the "Other releases" page for it)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic