[wp-trac] [WordPress Trac] #10607: return variable $new_array in wp-includes/wp-db.php is not initialized
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 13 17:36:12 UTC 2009
#10607: return variable $new_array in wp-includes/wp-db.php is not initialized
-------------------------------+--------------------------------------------
Reporter: UnderWordPressure | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.8.3
Severity: normal | Keywords: variable initialization
-------------------------------+--------------------------------------------
Concerns "function get_results($query = null, $output = OBJECT)".
If the query is valid, but the result is empty the "return $new_array"
$new_array is uninitialized.
You can see this, if you enable "error_reporting(E_ALL)".
"$new_array = array();" at the begin of the function will solve the error.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10607>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list