Skip to content

Commit b0ed9af

Browse files
committed
removed PHP < 7 support
1 parent 3fde4f4 commit b0ed9af

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/Forms/Form.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,6 @@ public function __toString(): string
648648
return $this->getRenderer()->render($this);
649649

650650
} catch (\Throwable $e) {
651-
} catch (\Exception $e) {
652-
}
653-
if (isset($e)) {
654651
if (func_num_args()) {
655652
throw $e;
656653
}

src/Forms/Rules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function addFilter($filter)
179179
$this->rules[] = $rule = new Rule;
180180
$rule->control = $this->control;
181181
$rule->validator = function (IControl $control) use ($filter) {
182-
$control->setValue(call_user_func($filter, $control->getValue()));
182+
$control->setValue($filter($control->getValue()));
183183
return TRUE;
184184
};
185185
return $this;
@@ -287,7 +287,7 @@ public static function validateRule(Rule $rule)
287287
$val = $val instanceof IControl ? $val->getValue() : $val;
288288
}
289289
return $rule->isNegative
290-
xor call_user_func(self::getCallback($rule), $rule->control, is_array($rule->arg) ? $args : $args[0]);
290+
xor self::getCallback($rule)($rule->control, is_array($rule->arg) ? $args : $args[0]);
291291
}
292292

293293

0 commit comments

Comments
 (0)