From 8eb045f2d1ed7fb1adcb6618e49421ec43834dbd Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Tue, 3 Mar 2020 10:38:03 -0600 Subject: [PATCH] Minor performance improvement Don't bother retrieving the translated URL at construction time, it will be run through the translator during the validation process so there's no need to always hit the translator on every single Page model being loaded. --- modules/cms/classes/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms/classes/Page.php b/modules/cms/classes/Page.php index f58d15af1..ad3b1d46d 100644 --- a/modules/cms/classes/Page.php +++ b/modules/cms/classes/Page.php @@ -56,7 +56,7 @@ class Page extends CmsCompoundObject parent::__construct($attributes); $this->customMessages = [ - 'url.regex' => Lang::get('cms::lang.page.invalid_url') + 'url.regex' => 'cms::lang.page.invalid_url', ]; }