From 24cfc5136e7d34e72661794e23f036f14fc8cc3e Mon Sep 17 00:00:00 2001 From: cynic Date: Fri, 22 Sep 2023 21:44:33 -0500 Subject: some misc. oracles stuff (fixes/features) (#15) fix a small calc.php bug, and add date information to the time module. the changes have been sitting on a branch for like a week, so I figured I'd cherry-pick them over to this branch for a PR. [as always, these changes are live on my instance.](https://4get.silly.computer/web?s=what+is+the+date&scraper=yandex&nsfw=yes) Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/15 Co-authored-by: cynic Co-committed-by: cynic --- oracles/calc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'oracles/calc.php') diff --git a/oracles/calc.php b/oracles/calc.php index bcc127b..833749e 100644 --- a/oracles/calc.php +++ b/oracles/calc.php @@ -118,7 +118,7 @@ class calculator extends oracle { if (count($tokens) > 0 && $tokens[0][0] == "o" || $tokens[count($tokens)-1][0] == "o") { throw new Exception("Error Processing Request", 1); } - if (in_array(["g", "("], $tokens)) { + while (in_array(["g", "("], $tokens)) { $first_open = array_search(["g", "("], $tokens); $enclosedality = 1; for ($i = $first_open+1; $i < count($tokens); $i++) { -- cgit v1.2.3