Commit 2ac4568
authored
Make is_text_col's search case-insensitive for sqlite support (#177)
When using wp-sqlite-db as the back end for WordPress, wpcli's `search-replace` command fails because wp-sqlite-db returns text column types as `TEXT`, and wpcli search-replace checks whether a column is textual in `is_text_col` with `strpos` for "text" or "varchar". If this were `stripos` instead of `strpos` then this problem would be resolved, which would be nice, and I don't believe there would be any backward compatibility implications. So, here's a one-character PR :-)
(Of course, sqlite as backend isn't actually supported, but this is a fairly small change which should make things better for that without affecting the mainline code. I've also proposed aaemnnosttv/wp-sqlite-db#56 to wp-sqlite-db to have that return lowercase "text" for column types as well, thus hopefully fixing the problem at both ends.)1 parent 819c028 commit 2ac4568
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| |||
0 commit comments