Replace SqlParser\Context::$MODE with getMode() and setMode()

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2023-06-07 15:24:34 -03:00
parent dbb0ad4a66
commit 8687c58db2
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 4 additions and 9 deletions

View File

@ -1390,7 +1390,7 @@ class ExportSql extends ExportPlugin
}
// Old mode is stored so it can be restored once exporting is done.
$oldMode = Context::$MODE;
$oldMode = Context::getMode();
$warning = '';
@ -1489,12 +1489,12 @@ class ExportSql extends ExportPlugin
if (! $this->useSqlBackquotes) {
// Option "Enclose table and column names with backquotes"
// was checked.
Context::$MODE |= Context::SQL_MODE_NO_ENCLOSING_QUOTES;
Context::setMode(Context::getMode() | Context::SQL_MODE_NO_ENCLOSING_QUOTES);
}
// Using appropriate quotes.
if ($compat === 'MSSQL') {
Context::$MODE |= Context::SQL_MODE_ANSI_QUOTES;
Context::setMode(Context::getMode() | Context::SQL_MODE_ANSI_QUOTES);
}
}
@ -1695,7 +1695,7 @@ class ExportSql extends ExportPlugin
}
// Restoring old mode.
Context::$MODE = $oldMode;
Context::setMode($oldMode);
return $warning . $schemaCreate . ($addSemicolon ? ';' . "\n" : '');
}

View File

@ -4600,11 +4600,6 @@ parameters:
count: 1
path: libraries/classes/Navigation/NavigationTree.php
-
message: "#^Method PhpMyAdmin\\\\Navigation\\\\NavigationTree\\:\\:parsePath\\(\\) should return non\\-empty\\-array\\<int, string\\> but returns non\\-empty\\-array\\<int, string\\|false\\>\\.$#"
count: 1
path: libraries/classes/Navigation/NavigationTree.php
-
message: "#^Only numeric types are allowed in \\+, int\\|false given on the left side\\.$#"
count: 1