mirror of
https://github.com/getgrav/grav.git
synced 2026-02-24 07:31:30 +01:00
moved $language variable inside catch statement
As requested
This commit is contained in:
@@ -72,13 +72,11 @@ class Blueprint
|
||||
{
|
||||
// Initialize data
|
||||
$this->fields();
|
||||
|
||||
// Get language class
|
||||
$language = self::getGrav()['language'];
|
||||
|
||||
try {
|
||||
$this->validateArray($data, $this->nested);
|
||||
} catch (\RuntimeException $e) {
|
||||
$language = self::getGrav()['language'];
|
||||
$message = sprintf($language->translate('FORM.VALIDATION_FAIL', null, true) . ' %s', $e->getMessage());
|
||||
throw new \RuntimeException($message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user