From 01949a79678eef36400122e37ba1775e1a9b07cb Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 22 Sep 2006 14:40:40 +0000 Subject: [PATCH] Check if array index is set. Props Alex King. fixes #3156 git-svn-id: http://svn.automattic.com/wordpress/trunk@4208 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/wp-db.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 43a652ac3..9cad94847 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -213,6 +213,9 @@ class wpdb { $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; if ( $query ) $this->query($query); + + if ( !isset($this->last_result[$y]) ) + return null; if ( $output == OBJECT ) { return $this->last_result[$y] ? $this->last_result[$y] : null;