Use strict in_array() calls
This commit is contained in:
parent
b39f26a3f7
commit
7d4a740f8f
|
@ -259,7 +259,7 @@ class MD_STD {
|
|||
while (!empty($lang_code)) {
|
||||
// phpcs:enable
|
||||
// mal sehen, ob der Sprachcode angeboten wird
|
||||
if (\in_array(\strtolower(\join('-', $lang_code)), $allowed_languages)) {
|
||||
if (\in_array(\strtolower(\join('-', $lang_code)), $allowed_languages, true)) {
|
||||
// Qualität anschauen
|
||||
if ($lang_quality > $current_q) {
|
||||
// diese Sprache verwenden
|
||||
|
|
|
@ -20,7 +20,7 @@ class MD_STD_IN {
|
|||
*/
|
||||
final public static function sanitize_id($input):int {
|
||||
|
||||
$input = filter_var($input, FILTER_VALIDATE_INT, [
|
||||
$input = \filter_var($input, \FILTER_VALIDATE_INT, [
|
||||
'options' => [
|
||||
'min_range' => 1, // Minimum number of an ID generated.
|
||||
'max_range' => 4294967295 // Max value for MySQL's int data type
|
||||
|
@ -47,7 +47,7 @@ class MD_STD_IN {
|
|||
|
||||
if ($input === "") return 0;
|
||||
|
||||
$input = filter_var($input, FILTER_VALIDATE_INT, [
|
||||
$input = \filter_var($input, \FILTER_VALIDATE_INT, [
|
||||
'options' => [
|
||||
'min_range' => 0, // Minimum number of an ID generated.
|
||||
'max_range' => 4294967295 // Max value for MySQL's int data type
|
||||
|
@ -103,7 +103,7 @@ class MD_STD_IN {
|
|||
}
|
||||
else $output = self::sanitize_text($default);
|
||||
|
||||
if (!empty($allowed) and !in_array($output, $allowed)) {
|
||||
if (!empty($allowed) and !\in_array($output, $allowed, true)) {
|
||||
Throw new MDpageParameterNotFromListException("Parameter `{$var_name}` must be any of the allowed values: " . implode(', ', $allowed));
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ class MD_STD_IN {
|
|||
}
|
||||
else $output = self::sanitize_text($default);
|
||||
|
||||
if (!empty($allowed) and !in_array($output, $allowed)) {
|
||||
if (!empty($allowed) and !\in_array($output, $allowed, true)) {
|
||||
Throw new MDpageParameterNotFromListException("Parameter `{$var_name}` must be any of the allowed values: " . implode(', ', $allowed));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user