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
I am using grocery crud which use laminas-db v2.20. I have bugs when I have accents in my columns that I can correct if I made a change in laminas db and I think it's a bug of laminas db.
The bug come from
laminas-db/src/Adapter/Platform/AbstractPlatform.php function quoteIdentifierInFragment
Line 45:
$parts = preg_split(
$this->quoteIdentifierFragmentPattern,
$identifier,
-1,
PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
);
If $identifier has accent since $quoteIdentifierFragmentPattern = '/([^0-9,a-z,A-Z$_:])/i';
$identifer is broken done and particularly 2 bytes character are broken down in two.
To correct this it should be $quoteIdentifierFragmentPattern = /([^\p{L}0-9$_\-:])/iu' to include all accentued characters
This correction has also to be made in MySQL.php and i guess in some other files.
The text was updated successfully, but these errors were encountered:
Bug Report
I am using grocery crud which use laminas-db v2.20. I have bugs when I have accents in my columns that I can correct if I made a change in laminas db and I think it's a bug of laminas db.
The bug come from
laminas-db/src/Adapter/Platform/AbstractPlatform.php function quoteIdentifierInFragment
Line 45:
$parts = preg_split(
$this->quoteIdentifierFragmentPattern,
$identifier,
-1,
PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
);
If $identifier has accent since $quoteIdentifierFragmentPattern = '/([^0-9,a-z,A-Z$_:])/i';
$identifer is broken done and particularly 2 bytes character are broken down in two.
To correct this it should be $quoteIdentifierFragmentPattern = /([^\p{L}0-9$_\-:])/iu' to include all accentued characters
This correction has also to be made in MySQL.php and i guess in some other files.
The text was updated successfully, but these errors were encountered: