diff options
Diffstat (limited to 'includes/class-giglogadmin-venue.php')
-rw-r--r-- | includes/class-giglogadmin-venue.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/class-giglogadmin-venue.php b/includes/class-giglogadmin-venue.php index 0b73d24..049f117 100644 --- a/includes/class-giglogadmin-venue.php +++ b/includes/class-giglogadmin-venue.php @@ -85,14 +85,14 @@ if ( ! class_exists( 'GiglogAdmin_Venue' ) ) { public static function get( int $id ) : ?self { global $wpdb; - $results = $wpdb->get_results( + $res = $wpdb->get_results( $wpdb->prepare( "SELECT * from {$wpdb->prefix}giglogadmin_venues WHERE id = %d", $id ) ); - if ( ! $result ) { + if ( ! $res ) { error_log( "GiglogAdmin: Query for Venue with id={$id} returned null." ); return null; - } elseif ( count( $results ) > 1 ) { + } elseif ( count( $res ) > 1 ) { error_log( "GiglogAdmin: Query for venye with id={$id} returned " . count( $result ) @@ -101,7 +101,7 @@ if ( ! class_exists( 'GiglogAdmin_Venue' ) ) { return null; } - return new GiglogAdmin_Venue( $results[0] ); + return new GiglogAdmin_Venue( $res[0] ); } /** |