Support » Plugin: Memcached Object Cache » Fix for Notice: Undefined offset: 1

  • Resolved Todd Lahman


    Memcached Memcached plugin version 2.0.2 gives the following error message:

    Notice: Undefined offset: 1 in /var/www/html/wp-content/object-cache.php on line 374

    This results from only having the server listed as the default without a port:

    array(1) { [0]=> string(9) “” }

    There is no port listed to populate the port variable in line 374 resulting in the Undefined offset notice. Here is line 374:

    list ( $node, $port ) = explode(‘:’, $server);

    The solution is modify line 365 from:

    $buckets = array(‘’);


    $buckets = array(‘’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrew Nacin


    I’ve gone ahead and committed We won’t trigger a new release for just this, though; it probably won’t actually get released until the next major change to core’s API.

    James Bonham


    Hi Andrew. What is the reason for not releasing until the next version of the API? This is a bug that takes sites down when debug is set to true, due to header already sent errors that follow the notice.

    In addition, I have found a bug in trunk, where switch_to_blog does not define the global $table_prefix, causing keys to get muddled.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fix for Notice: Undefined offset: 1’ is closed to new replies.