Consistently use "null" over "NULL"
This commit is contained in:
3 files changed
+7
-6
No files matched your search
+3
-2
@@ -298,7 +298,7 @@ public static function runCurlMulti(array $urls, int $timeout = 1200):array {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$running = NULL;
|
$running = null;
|
||||||
do {
|
do {
|
||||||
usleep(10000);
|
usleep(10000);
|
||||||
curl_multi_exec($mh, $running);
|
curl_multi_exec($mh, $running);
|
||||||
@@ -371,7 +371,8 @@ public static function lang_getfrombrowser(array $allowed_languages, string $def
|
|||||||
if (isset($matches[2])) {
|
if (isset($matches[2])) {
|
||||||
// die Qualität benutzen
|
// die Qualität benutzen
|
||||||
$lang_quality = (float)$matches[2];
|
$lang_quality = (float)$matches[2];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// Kompabilitätsmodus: Qualität 1 annehmen
|
// Kompabilitätsmodus: Qualität 1 annehmen
|
||||||
$lang_quality = 1.0;
|
$lang_quality = 1.0;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -30,7 +30,7 @@ public static function shutdown_cache_through_redis(string $redisKey, int $expir
|
|||||||
echo $outputT;
|
echo $outputT;
|
||||||
|
|
||||||
$redis = new Redis();
|
$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->set($redisKey, $outputT);
|
||||||
$redis->expire($redisKey, $expiry);
|
$redis->expire($redisKey, $expiry);
|
||||||
$redis->close();
|
$redis->close();
|
||||||
@@ -51,7 +51,7 @@ public static function serve_page_through_redis_cache(string $redisKey, int $exp
|
|||||||
if (PHP_SAPI === 'cli') return '';
|
if (PHP_SAPI === 'cli') return '';
|
||||||
|
|
||||||
$redis = new Redis();
|
$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) {
|
if ($redis->ping() !== false) {
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|||||||
+2
-2
@@ -129,7 +129,7 @@ public static function get_http_input_text(string $var_name, string $default = "
|
|||||||
else $output = self::sanitize_text($default);
|
else $output = self::sanitize_text($default);
|
||||||
|
|
||||||
if (!empty($allowed) and !\in_array($output, $allowed, true)) {
|
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;
|
return $output;
|
||||||
@@ -154,7 +154,7 @@ public static function get_http_post_text(string $var_name, string $default = ""
|
|||||||
else $output = self::sanitize_text($default);
|
else $output = self::sanitize_text($default);
|
||||||
|
|
||||||
if (!empty($allowed) and !\in_array($output, $allowed, true)) {
|
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;
|
return $output;
|
||||||
|
|||||||
Reference in new issue
Block a user