Fix for Notice: Undefined offset: 1
-
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) “127.0.0.1” }
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(‘127.0.0.1’);
to:
$buckets = array(‘127.0.0.1:11211’);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fix for Notice: Undefined offset: 1’ is closed to new replies.