From 3fd20a86f3af32ebba1e2ec14ea18a0056c15919 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 25 Jul 2023 15:59:49 +0200 Subject: ensure that chance=0 never creates an error --- test/it_url.testserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/it_url.testserver.php b/test/it_url.testserver.php index 242ccf6..978e4af 100644 --- a/test/it_url.testserver.php +++ b/test/it_url.testserver.php @@ -75,7 +75,7 @@ switch ($_SERVER['PHP_SELF']) break; case "/maybe_error": - $iserror = rand(0, 99) <= $_REQUEST['chance']; + $iserror = rand(0, 99) < $_REQUEST['chance']; http_response_code($iserror ? 500 : 200); echo $iserror ? "failure" : "success"; break; -- cgit v1.2.3