mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
update torrentInfoPrivate method
This commit is contained in:
parent
ac7d496075
commit
041bddffa1
1 changed files with 19 additions and 1 deletions
|
|
@ -1852,7 +1852,25 @@ class Valid
|
|||
|
||||
public static function torrentInfoPrivate(mixed $value, array &$error = []) : bool
|
||||
{
|
||||
// @TODO
|
||||
if (!is_int($value))
|
||||
{
|
||||
array_push(
|
||||
$error,
|
||||
_('Invalid torrent info private data type')
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!in_array($value, [0, 1]))
|
||||
{
|
||||
array_push(
|
||||
$error,
|
||||
_('Invalid torrent info private value')
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue