Make WordPress Core

Opened 2 years ago

#54560 new enhancement

Return null from wpdb::get_results when query fails

Reported by: jeffstieler's profile jeffstieler Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Database Keywords: has-patch
Focuses: Cc:


It's not currently possible to know if a query failed internal to wpdb::get_results() since the result of $wpdb->query() isn't checked.

This diff introduces a null return from wpdb::get_results() when a boolean false is returned from wpdb::query().

Attachments (1)

wp-db.php.diff (708 bytes) - added by jeffstieler 2 years ago.

Download all attachments as: .zip

Change History (1)

Note: See TracTickets for help on using tickets.