mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 22:26:06 +01:00
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:
parent
e2a24f068b
commit
01949a7967
@ -214,6 +214,9 @@ class wpdb {
|
|||||||
if ( $query )
|
if ( $query )
|
||||||
$this->query($query);
|
$this->query($query);
|
||||||
|
|
||||||
|
if ( !isset($this->last_result[$y]) )
|
||||||
|
return null;
|
||||||
|
|
||||||
if ( $output == OBJECT ) {
|
if ( $output == OBJECT ) {
|
||||||
return $this->last_result[$y] ? $this->last_result[$y] : null;
|
return $this->last_result[$y] ? $this->last_result[$y] : null;
|
||||||
} elseif ( $output == ARRAY_A ) {
|
} elseif ( $output == ARRAY_A ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user