Skip to content

Commit

Permalink
Fix failing query for checking if installing for the first time (#65)
Browse files Browse the repository at this point in the history
* Fix failing query for checking if installing for the first time
* escape table name
  • Loading branch information
stephywells authored Jun 19, 2024
1 parent bc08546 commit 13a162b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@ function awpcp_directory_permissions() {
function awpcp_table_exists($table) {
global $wpdb;
$result = $wpdb->get_var(
$wpdb->prepare( 'SHOW TABLES LIKE %i', $table )
$wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) )
);
return strcasecmp($result, $table) === 0;
}
Expand Down

0 comments on commit 13a162b

Please sign in to comment.