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 https://github.com/aaemnnosttv/wp-sqlite-db/pull/56 to wp-sqlite-db to have that return lowercase "text" for column types as well, thus hopefully fixing the problem at both ends.)
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 asTEXT
, and wpcli search-replace checks whether a column is textual inis_text_col
withstrpos
for "text" or "varchar". If this werestripos
instead ofstrpos
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 https://github.com/aaemnnosttv/wp-sqlite-db/pull/56 to wp-sqlite-db to have that return lowercase "text" for column types as well, thus hopefully fixing the problem at both ends.)