Make WordPress Core

Opened 5 years ago

#54560 new enhancement

Return null from wpdb::get_results when query fails

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

Description

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 5 years ago.

Download all attachments as: .zip

Change History (1)

Note: See TracTickets for help on using tickets.