Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 196f4d3

Browse files
authoredOct 28, 2022
Fix retrieval of get_post_table_characterset (#231)
Query command run through `assoc_args_to_str` get double quotes truncated and fail to execute. Using single quotes in the query prevent error. `Warning: Failed to get current character set of the posts table. Reason: ERROR at line 1: Unknown command '\_'` Error may be more prominent on windows.
1 parent c99bee5 commit 196f4d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/DB_Command.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ private function get_posts_table_charset( $assoc_args ) {
657657
. 'FROM information_schema.`TABLES` T, '
658658
. 'information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA '
659659
. 'WHERE CCSA.collation_name = T.table_collation '
660-
. 'AND T.table_schema = "' . DB_NAME . '" '
661-
. 'AND T.table_name LIKE "%\_posts";';
660+
. "AND T.table_schema = '" . DB_NAME . "' "
661+
. "AND T.table_name LIKE '%\_posts';";
662662

663663
list( $stdout, $stderr, $exit_code ) = self::run(
664664
sprintf(

0 commit comments

Comments
 (0)
Please sign in to comment.