From 217e1fc86b461367bc04e5251f8e2ae8867e35a7 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Sat, 6 Feb 2021 19:55:54 +0100 Subject: [PATCH] Consistently use "null" over "NULL" --- MD_STD.php | 5 +++-- MD_STD_CACHE.php | 4 ++-- MD_STD_IN.php | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MD_STD.php b/MD_STD.php index 5776ecb..9a2f2a0 100644 --- a/MD_STD.php +++ b/MD_STD.php @@ -298,7 +298,7 @@ final class MD_STD { } - $running = NULL; + $running = null; do { usleep(10000); curl_multi_exec($mh, $running); @@ -371,7 +371,8 @@ final class MD_STD { if (isset($matches[2])) { // die Qualität benutzen $lang_quality = (float)$matches[2]; - } else { + } + else { // Kompabilitätsmodus: Qualität 1 annehmen $lang_quality = 1.0; } diff --git a/MD_STD_CACHE.php b/MD_STD_CACHE.php index 9cde874..097c0e7 100644 --- a/MD_STD_CACHE.php +++ b/MD_STD_CACHE.php @@ -30,7 +30,7 @@ final class MD_STD_CACHE { echo $outputT; $redis = new Redis(); - $redis->connect(self::$redis_host, self::$redis_port, 1, NULL, 0, 0, ['auth' => [MD_CONF::$redis_pw]]); + $redis->connect(self::$redis_host, self::$redis_port, 1, null, 0, 0, ['auth' => [MD_CONF::$redis_pw]]); $redis->set($redisKey, $outputT); $redis->expire($redisKey, $expiry); $redis->close(); @@ -51,7 +51,7 @@ final class MD_STD_CACHE { if (PHP_SAPI === 'cli') return ''; $redis = new Redis(); - $redis->connect(self::$redis_host, self::$redis_port, 1, NULL, 0, 0, ['auth' => [MD_CONF::$redis_pw]]); + $redis->connect(self::$redis_host, self::$redis_port, 1, null, 0, 0, ['auth' => [MD_CONF::$redis_pw]]); if ($redis->ping() !== false) { ob_start(); diff --git a/MD_STD_IN.php b/MD_STD_IN.php index 97aaaa7..fb0102a 100644 --- a/MD_STD_IN.php +++ b/MD_STD_IN.php @@ -129,7 +129,7 @@ final class MD_STD_IN { else $output = self::sanitize_text($default); if (!empty($allowed) and !\in_array($output, $allowed, true)) { - Throw new MDpageParameterNotFromListException("Parameter `{$var_name}` must be any of the allowed values: '" . implode('\', \'', $allowed) . "'"); + throw new MDpageParameterNotFromListException("Parameter `{$var_name}` must be any of the allowed values: '" . implode('\', \'', $allowed) . "'"); } return $output; @@ -154,7 +154,7 @@ final class MD_STD_IN { else $output = self::sanitize_text($default); if (!empty($allowed) and !\in_array($output, $allowed, true)) { - Throw new MDpageParameterNotFromListException("Parameter `{$var_name}` must be any of the allowed values: '" . implode('\', \'', $allowed) . "'"); + throw new MDpageParameterNotFromListException("Parameter `{$var_name}` must be any of the allowed values: '" . implode('\', \'', $allowed) . "'"); } return $output;