mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 10:38:49 +01:00
384 B
384 B
TaintedSql
Emitted when tainted input detection is turned on and tainted SQL is detected.
<?php
class A {
public function deleteUser(PDO $pdo) : void {
$userId = self::getUserId();
$pdo->exec("delete from users where user_id = " . $userId);
}
public static function getUserId() : string {
return (string) $_GET["user_id"];
}
}