Force empty to be 0 for in_mask #1180
This commit is contained in:
@@ -30,6 +30,10 @@ if (!function_exists('in_mask')) {
|
|||||||
*/
|
*/
|
||||||
function in_mask($mask, $value)
|
function in_mask($mask, $value)
|
||||||
{
|
{
|
||||||
|
if (empty($mask)) {
|
||||||
|
$mask = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return ($mask & $value) === $value;
|
return ($mask & $value) === $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user