Consistently use "null" over "NULL"

This commit is contained in:
Joshua Ramon Enslin 2021-02-06 19:55:54 +01:00
parent 605fd88b6e
commit 217e1fc86b
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
3 changed files with 7 additions and 6 deletions

View File

@ -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;
}

View File

@ -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();

View File

@ -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;