Skip to content

Commit

Permalink
Remove usage of mb_strlen
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Jan 27, 2022
1 parent 47e81a5 commit 50f3222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 2 additions & 3 deletions libraries/classes/Routing.php
Expand Up @@ -20,7 +20,6 @@
use function is_array;
use function is_readable;
use function is_writable;
use function mb_strlen;
use function rawurldecode;
use function sprintf;
use function trigger_error;
Expand Down Expand Up @@ -129,9 +128,9 @@ public static function getCurrentRoute(): string
*
* @see https://docs.phpmyadmin.net/en/latest/faq.html#faq1-34
*/
if (($route === '/' || $route === '') && isset($_GET['db']) && mb_strlen($_GET['db']) !== 0) {
if (($route === '/' || $route === '') && isset($_GET['db']) && $_GET['db'] !== '') {
$route = '/database/structure';
if (isset($_GET['table']) && mb_strlen($_GET['table']) !== 0) {
if (isset($_GET['table']) && $_GET['table'] !== '') {
$route = '/sql';
}
}
Expand Down
6 changes: 0 additions & 6 deletions psalm-baseline.xml
Expand Up @@ -11906,12 +11906,6 @@
<code>isset($dbi)</code>
</RedundantCondition>
</file>
<file src="libraries/classes/Routing.php">
<MixedArgument occurrences="2">
<code>$_GET['db']</code>
<code>$_GET['table']</code>
</MixedArgument>
</file>
<file src="libraries/classes/Sanitize.php">
<MixedArgument occurrences="6">
<code>$found[1]</code>
Expand Down

0 comments on commit 50f3222

Please sign in to comment.