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
This commit is contained in:
ryan 2006-09-22 14:40:40 +00:00
parent e2a24f068b
commit 01949a7967
1 changed files with 3 additions and 0 deletions

View File

@ -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;