You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-31 10:54:46 +03:00
Remove escapeString completely
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
@@ -5125,7 +5125,6 @@
|
||||
<code><![CDATA[$this->connections[$connectionType]]]></code>
|
||||
<code><![CDATA[$this->connections[$connectionType]]]></code>
|
||||
<code><![CDATA[$this->connections[$connectionType]]]></code>
|
||||
<code><![CDATA[$this->connections[$connectionType]]]></code>
|
||||
<code><![CDATA[$this->versionComment]]></code>
|
||||
<code><![CDATA[$this->versionString]]></code>
|
||||
</MixedArgument>
|
||||
@@ -13830,8 +13829,6 @@
|
||||
<file src="tests/classes/Dbal/DbiDummyTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code>Config::getInstance()</code>
|
||||
<code>escapeString</code>
|
||||
<code>escapeString</code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code>errorData</code>
|
||||
|
||||
@@ -1878,25 +1878,6 @@ class DatabaseInterface implements DbalInterface
|
||||
return "'" . $this->extension->escapeString($this->connections[$connectionType], $str) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* returns properly escaped string for use in MySQL queries
|
||||
*
|
||||
* @deprecated Use {@see quoteString()} instead.
|
||||
*
|
||||
* @param string $str string to be escaped
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return string a MySQL escaped string
|
||||
*/
|
||||
public function escapeString(string $str, int $connectionType = Connection::TYPE_USER): string
|
||||
{
|
||||
if (isset($this->connections[$connectionType])) {
|
||||
return $this->extension->escapeString($this->connections[$connectionType], $str);
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns properly escaped string for use in MySQL LIKE clauses.
|
||||
* This method escapes only _, %, and /. It does not escape quotes or any other characters.
|
||||
|
||||
@@ -563,18 +563,6 @@ interface DbalInterface
|
||||
*/
|
||||
public function quoteString(string $str, int $connectionType = Connection::TYPE_USER): string;
|
||||
|
||||
/**
|
||||
* returns properly escaped string for use in MySQL queries
|
||||
*
|
||||
* @deprecated Use {@see quoteString()} instead.
|
||||
*
|
||||
* @param string $str string to be escaped
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return string a MySQL escaped string
|
||||
*/
|
||||
public function escapeString(string $str, int $connectionType = Connection::TYPE_USER): string;
|
||||
|
||||
/**
|
||||
* Returns properly escaped string for use in MySQL LIKE clauses.
|
||||
* This method escapes only _, %, and /. It does not escape quotes or any other characters.
|
||||
|
||||
@@ -112,19 +112,4 @@ class DbiDummyTest extends AbstractTestCase
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for string escaping
|
||||
*/
|
||||
public function testEscapeString(): void
|
||||
{
|
||||
$this->assertEquals(
|
||||
'a',
|
||||
$this->dbi->escapeString('a'),
|
||||
);
|
||||
$this->assertEquals(
|
||||
'a\\\'',
|
||||
$this->dbi->escapeString('a\''),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user