From 08aabd6476b5f6eed2933655f46cdfdc59a318cc Mon Sep 17 00:00:00 2001 From: "Adrienne L. Travis" Date: Thu, 27 Sep 2018 18:01:42 -0700 Subject: [PATCH] Fixing settings assignment There was a bug in how this interacted with the underlying php-typography plugin, such that trying to set any settings would cause an error because the setter function wasn't found. I fixed it. --- src/services/TypographyService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/TypographyService.php b/src/services/TypographyService.php index 4f49d8b..230c5b5 100644 --- a/src/services/TypographyService.php +++ b/src/services/TypographyService.php @@ -72,7 +72,8 @@ public function getTypographer() if (is_array($settings)) { foreach ($settings as $key => $value) { - $this->_typographySettings->{$key}($value); + $func = "set_{$key}"; + $this->_typographySettings->$func($value); } } @@ -93,7 +94,8 @@ public function getTypographySettings($adhocSettings = []) if (is_array($adhocSettings)) { foreach ($adhocSettings as $key => $value) { - $settings->{$key}($value); + $func = "set_{$key}"; + $settings->$func($value); } }