diff --git a/lib/Core.php b/lib/Core.php index 117753e7..f83331d1 100644 --- a/lib/Core.php +++ b/lib/Core.php @@ -13,7 +13,7 @@ date_default_timezone_set('UTC'); // Custom error handler to output more details about the specific Apache request that caused an exception. set_exception_handler(function(Throwable $ex): void{ $errorString = "----------------------------------------\n"; - $errorString .= trim(vds(array_intersect_key($_SERVER, array('REQUEST_URI' => '', 'QUERY_STRING' => '', 'REQUEST_METHOD' => '', 'REDIRECT_QUERY_STRING' => '', 'REDIRECT_URL' => '', 'SCRIPT_FILENAME' => '', 'REMOTE_ADDR' => '', 'HTTP_COOKIE' => '', 'HTTP_USER_AGENT' => '', 'SCRIPT_URI' => '')))); + $errorString .= trim(vds(array_intersect_key($_SERVER, ['REQUEST_URI' => '', 'QUERY_STRING' => '', 'REQUEST_METHOD' => '', 'REDIRECT_QUERY_STRING' => '', 'REDIRECT_URL' => '', 'SCRIPT_FILENAME' => '', 'REMOTE_ADDR' => '', 'HTTP_COOKIE' => '', 'HTTP_USER_AGENT' => '', 'SCRIPT_URI' => '']))); if(sizeof($_POST) > 0){ $errorString .= "POST DATA:\n"; diff --git a/lib/HttpInput.php b/lib/HttpInput.php index a05a7b7c..0e6d03c8 100644 --- a/lib/HttpInput.php +++ b/lib/HttpInput.php @@ -34,7 +34,7 @@ class HttpInput{ } private static function GetHttpVar(string $variable, int $type, int $set, $default){ - $vars = array(); + $vars = []; switch($set){ case GET: diff --git a/scripts/generate-opds.php b/scripts/generate-opds.php index 84d86087..77442662 100644 --- a/scripts/generate-opds.php +++ b/scripts/generate-opds.php @@ -6,7 +6,7 @@ use function Safe\getopt; use function Safe\preg_replace; use function Safe\sort; -$longopts = array("webroot:", "weburl:"); +$longopts = ["webroot:", "weburl:"]; $options = getopt("", $longopts); $webRoot = $options["webroot"] ?? "/standardebooks.org/web"; $webUrl = $options["weburl"] ?? "https://standardebooks.org"; diff --git a/scripts/generate-rss.php b/scripts/generate-rss.php index 2f0b8664..66a6755b 100644 --- a/scripts/generate-rss.php +++ b/scripts/generate-rss.php @@ -7,7 +7,7 @@ use function Safe\krsort; use function Safe\preg_replace; use function Safe\strtotime; -$longopts = array("webroot:", "weburl:"); +$longopts = ["webroot:", "weburl:"]; $options = getopt("", $longopts); $webRoot = $options["webroot"] ?? "/standardebooks.org/web"; $webUrl = $options["weburl"] ?? "https://standardebooks.org";