From d87552c90e412374e9ad97632548b7088ea2e864 Mon Sep 17 00:00:00 2001 From: DraperStudio Date: Wed, 20 Apr 2016 13:37:57 +0200 Subject: [PATCH] Use object_get to retrieve a config field --- app/Models/AccountGateway.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/Models/AccountGateway.php b/app/Models/AccountGateway.php index a4027db6ef36..5e951285349e 100644 --- a/app/Models/AccountGateway.php +++ b/app/Models/AccountGateway.php @@ -60,13 +60,7 @@ class AccountGateway extends EntityModel public function getConfigField($field) { - $config = $this->getConfig(); - - if (!$field || !property_exists($config, $field)) { - return false; - } - - return $config->$field; + return object_get($this->getConfig(), $field, false); } public function getPublishableStripeKey()