From c2279477440c4331dd14f875a8ad72c41226a1dc Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@4208 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 43a652ac3a..9cad948477 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;