Access _POST and _SESSION directly
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
parent
657d1d0784
commit
fa744d78a4
@ -20712,12 +20712,6 @@ parameters:
|
||||
count: 1
|
||||
path: tests/unit/SqlTest.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''tmpval'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
count: 4
|
||||
path: tests/unit/SqlTest.php
|
||||
|
||||
-
|
||||
message: '#^Method PhpMyAdmin\\Tests\\Stubs\\DbiDummy\:\:connect\(\) never returns null so it can be removed from the return type\.$#'
|
||||
identifier: return.unusedType
|
||||
|
||||
@ -12676,14 +12676,10 @@
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAssignment>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$GLOBALS['_SESSION']['tmpval']['pos']]]></code>
|
||||
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$_SESSION['tmpval']['pos']]]></code>
|
||||
</MixedArrayAssignment>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[dataProviderCountQueryResults]]></code>
|
||||
|
||||
@ -27,7 +27,7 @@ class SearchTest extends AbstractTestCase
|
||||
parent::setUp();
|
||||
|
||||
Current::$database = 'pma';
|
||||
$GLOBALS['_POST'] = [];
|
||||
$_POST = [];
|
||||
|
||||
//mock DBI
|
||||
$dbi = $this->getMockBuilder(DatabaseInterface::class)
|
||||
|
||||
@ -79,8 +79,8 @@ class SqlTest extends AbstractTestCase
|
||||
public function testGetSqlWithLimitClause(): void
|
||||
{
|
||||
// Test environment.
|
||||
$GLOBALS['_SESSION']['tmpval']['pos'] = 1;
|
||||
$GLOBALS['_SESSION']['tmpval']['max_rows'] = 2;
|
||||
$_SESSION['tmpval']['pos'] = 1;
|
||||
$_SESSION['tmpval']['max_rows'] = 2;
|
||||
|
||||
self::assertSame('SELECT * FROM test LIMIT 1, 2', $this->callFunction(
|
||||
$this->sql,
|
||||
@ -135,7 +135,7 @@ class SqlTest extends AbstractTestCase
|
||||
public function testIsAppendLimitClause(): void
|
||||
{
|
||||
// Test environment.
|
||||
$GLOBALS['_SESSION']['tmpval']['max_rows'] = 10;
|
||||
$_SESSION['tmpval']['max_rows'] = 10;
|
||||
|
||||
self::assertTrue(
|
||||
$this->callFunction($this->sql, Sql::class, 'isAppendLimitClause', [
|
||||
@ -153,7 +153,7 @@ class SqlTest extends AbstractTestCase
|
||||
public function testIsJustBrowsing(): void
|
||||
{
|
||||
// Test environment.
|
||||
$GLOBALS['_SESSION']['tmpval']['max_rows'] = 10;
|
||||
$_SESSION['tmpval']['max_rows'] = 10;
|
||||
|
||||
self::assertTrue(Sql::isJustBrowsing(
|
||||
ParseAnalyze::sqlQuery('SELECT * FROM db.tbl', Current::$database)[0],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user