mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
⬆️ N°4770 Update to latest Symfony 3.4
This commit is contained in:
@@ -188,8 +188,11 @@ class Question
|
||||
*/
|
||||
public function setMaxAttempts($attempts)
|
||||
{
|
||||
if (null !== $attempts && $attempts < 1) {
|
||||
throw new InvalidArgumentException('Maximum number of attempts must be a positive value.');
|
||||
if (null !== $attempts) {
|
||||
$attempts = (int) $attempts;
|
||||
if ($attempts < 1) {
|
||||
throw new InvalidArgumentException('Maximum number of attempts must be a positive value.');
|
||||
}
|
||||
}
|
||||
|
||||
$this->attempts = $attempts;
|
||||
|
||||
Reference in New Issue
Block a user