Skip to content

Commit

Permalink
Merge pull request #34 from shinsenter/develop
Browse files Browse the repository at this point in the history
Fixed option parsing
  • Loading branch information
shinsenter committed Apr 18, 2019
2 parents b5171aa + e42bb4d commit d024be3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DeferOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ public function __set($property, $value = null)

if (isset($this->options[$key])) {
switch (true) {
case is_array($this->options[$key]):
case in_array($key, ['web_fonts_patterns', 'do_not_optimize']):
$this->options[$key] = (array) $this->escapeRegex($flag);
break;
case is_array($this->options[$key]):
$this->options[$key] = (array) $flag;
break;
case is_numeric($this->options[$key]):
$this->options[$key] = (int) $flag;
break;
Expand Down

0 comments on commit d024be3

Please sign in to comment.