From c6c21c0d26f544c1fc248eb87789296befcf424f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 17 Nov 2005 22:46:18 +0000 Subject: [PATCH] Don't loop over empty options. fixes #1900 git-svn-id: https://develop.svn.wordpress.org/trunk@3138 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/cache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/cache.php b/wp-includes/cache.php index f4958c0885..67d8d3ada4 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -184,6 +184,9 @@ class WP_Object_Cache { } $wpdb->show_errors(); + if ( ! $options ) + return; + foreach ($options as $option) { $this->cache['options'][$option->option_name] = $option->option_value; }