You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The merge from 6.2.0 has made a change to the file class-wpdb.php (which replaced the now deprecated file wp-includes/wp-db.php) which removed several lines, including the following on line 1470:
$query = preg_replace( "/(?<!%)(%($allowed_format)?f)/", '%\\2F', $query ); // Force floats to be locale-unaware.$query = preg_replace( '/(?<!%)%s/', " N'%s'", $query ); // Quote the strings, avoiding escaped strings like %%s.
The N' at the start ensured that strings were passed as an nvarchar, rather than a varchar, which is vital as the columns in the database from Nami are nvarchar values as well; using varchar literals would result in data loss as characters outside of the code page of the database would appear as ?.
This is still the case in the latest version, and so characters outside the code page (likely ANSI) are lost.
As the line that was there before has been completely removed, I'm unsure if it should have been (and was in error), or if the new line is designed to try to address what the prior lines did:
@patrickebates Hey there. Since I haven't heard back from @LarnuUK , I was wondering if you would be able to help test the change I posted to fix this (i.e. #516 ) in the hopes of being able to merge the fix. Thanks!
The merge from 6.2.0 has made a change to the file
class-wpdb.php
(which replaced the now deprecated filewp-includes/wp-db.php
) which removed several lines, including the following on line 1470:The
N'
at the start ensured that strings were passed as annvarchar
, rather than avarchar
, which is vital as the columns in the database from Nami arenvarchar
values as well; usingvarchar
literals would result in data loss as characters outside of the code page of the database would appear as?
.This is still the case in the latest version, and so characters outside the code page (likely ANSI) are lost.
As the line that was there before has been completely removed, I'm unsure if it should have been (and was in error), or if the new line is designed to try to address what the prior lines did:
I did a quick test and adding the old
preg_replace
line breaks the site, this occurs when placing it both before and after the new line.The text was updated successfully, but these errors were encountered: