Skip to content

Commit

Permalink
Map: Check for search param before using
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Dec 4, 2023
1 parent 1352b4b commit 03a432f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mu-plugins/blocks/google-map/inc/event-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function get_all_upcoming_events( array $facets = array() ): array {
$where_clauses = '';
$where_clause_values = array();

if ( $facets['search'] ) {
if ( ! empty( $facets['search'] ) ) {
$where_clauses .= ' AND ( title LIKE "%%%s%%" OR description LIKE "%%%s%%" OR meetup LIKE "%%%s%%" OR location LIKE "%%%s%%" )';
$where_clause_values[] = $facets['search'];
$where_clause_values[] = $facets['search'];
Expand Down

0 comments on commit 03a432f

Please sign in to comment.