diff --git a/controllers/internals/Command.php b/controllers/internals/Command.php index aee4757..10f10c5 100644 --- a/controllers/internals/Command.php +++ b/controllers/internals/Command.php @@ -99,7 +99,7 @@ namespace controllers\internals; //Check for user $internal_user = new \controllers\internals\User($this->bdd); $user = $internal_user->check_credentials($decode_message['login'], $decode_message['password']); - if (!$user || $user['id'] !== $id_user) + if (!$user || (int) $user['id'] !== $id_user) { return false; } diff --git a/tests/php-cs-fixer/php_cs.config b/tests/php-cs-fixer/php_cs.config index d364092..4b661e9 100644 --- a/tests/php-cs-fixer/php_cs.config +++ b/tests/php-cs-fixer/php_cs.config @@ -25,7 +25,7 @@ $config = PhpCsFixer\Config::create() '@PHP56Migration' => true, '@PHPUnit60Migration:risky' => true, '@PhpCsFixer' => true, - '@PhpCsFixer:risky' => true, + '@PhpCsFixer:risky' => false, 'header_comment' => ['header' => $header], 'list_syntax' => ['syntax' => 'long'], 'array_syntax' => ['syntax' => 'short'],