Skip to content

Commit da2d216

Browse files
committed
Fixes deprecated warning
1 parent 7d4b967 commit da2d216

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Valid.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,14 @@ public static function second($second)
184184
/**
185185
* Test for valid weekDay
186186
*
187-
* @param string $weekDay
187+
* @param string|null $weekDay
188188
* @return bool
189189
*/
190190
public static function weekDay($weekDay)
191191
{
192+
if ($weekDay === null) {
193+
return false;
194+
}
192195
return in_array(strtolower($weekDay), self::$weekDays);
193196
}
194197

0 commit comments

Comments
 (0)