From 3f94a6fda97b2589f3cd3be3d6c8240f329a8079 Mon Sep 17 00:00:00 2001 From: Paul Bovis Date: Tue, 17 Nov 2015 14:25:51 -0700 Subject: [PATCH] moved $language variable inside catch statement As requested --- system/src/Grav/Common/Data/Blueprint.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/src/Grav/Common/Data/Blueprint.php b/system/src/Grav/Common/Data/Blueprint.php index 7aa51440e..9bfc32303 100644 --- a/system/src/Grav/Common/Data/Blueprint.php +++ b/system/src/Grav/Common/Data/Blueprint.php @@ -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); }