From 505cab0210e83bf62085b665abad0698a8d31352 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 12 Jan 2026 17:16:41 +0100 Subject: =?UTF-8?q?upload=20de=20fichiers=20(JS=20+=20contr=C3=B4leur=20+?= =?UTF-8?q?=20htaccess),=20collage=20de=20fichiers=20dans=20l'=C3=A9diteur?= =?UTF-8?q?=20(JS),=20am=C3=A9lioration=20utilisation=20de=20Imagick=20(Im?= =?UTF-8?q?ageUploadController)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Captcha.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Captcha.php') diff --git a/src/Captcha.php b/src/Captcha.php index f60031a..a0c7a54 100644 --- a/src/Captcha.php +++ b/src/Captcha.php @@ -10,12 +10,10 @@ class Captcha { private int $a; private int $b; - private int $solution; public function __construct(){ $this->a = rand(2, 9); $this->b = rand(2, 9); - $this->solution = $this->a * $this->b; } public function getA(): string @@ -28,7 +26,7 @@ class Captcha } public function getSolution(): int { - return $this->solution; + return ($this->a * $this->b); } private function toLettersFrench(int $number): string @@ -45,6 +43,8 @@ class Captcha default => '', // erreur }; } + + // (à déplacer dans FormValidation?) static public function controlInput(string $input = '0'): int { // un POST est une chaîne qu'on doit convertir en nombre dans deux conditions: -- cgit v1.2.3