Merge pull request #18491 from kamil-tekiela/USE_UTF_STRINGS
Remove USE_UTF_STRINGS
This commit is contained in:
commit
fa8931e88c
@ -13,11 +13,9 @@ use PhpMyAdmin\SqlParser\UtfString;
|
||||
use PhpMyAdmin\SqlParser\Utils\Error as ParserError;
|
||||
|
||||
use function __;
|
||||
use function defined;
|
||||
use function htmlspecialchars;
|
||||
use function mb_strlen;
|
||||
use function sprintf;
|
||||
use function strlen;
|
||||
|
||||
/**
|
||||
* The linter itself.
|
||||
@ -33,7 +31,7 @@ class Linter
|
||||
*/
|
||||
public static function getLines(string|UtfString $str): array
|
||||
{
|
||||
if ((! ($str instanceof UtfString)) && defined('USE_UTF_STRINGS') && USE_UTF_STRINGS) {
|
||||
if ((! ($str instanceof UtfString))) {
|
||||
// If the lexer uses UtfString for processing then the position will
|
||||
// represent the position of the character and not the position of
|
||||
// the byte.
|
||||
@ -52,7 +50,7 @@ class Linter
|
||||
// first byte of the third character. The fourth and the last one
|
||||
// (which is actually a new line) aren't going to be processed at
|
||||
// all.
|
||||
$len = $str instanceof UtfString ? $str->length() : strlen($str);
|
||||
$len = $str->length();
|
||||
|
||||
$lines = [0];
|
||||
for ($i = 0; $i < $len; ++$i) {
|
||||
|
||||
@ -7356,9 +7356,6 @@
|
||||
<PossiblyNullOperand>
|
||||
<code>$error[3]</code>
|
||||
</PossiblyNullOperand>
|
||||
<UndefinedConstant>
|
||||
<code>USE_UTF_STRINGS</code>
|
||||
</UndefinedConstant>
|
||||
</file>
|
||||
<file src="libraries/classes/ListDatabase.php">
|
||||
<InvalidArrayOffset>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user