Replace SqlParser\Context::$MODE with getMode() and setMode()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
dbb0ad4a66
commit
8687c58db2
@ -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" : '');
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user