Skip to content

Commit

Permalink
[+]: changes for old php-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Moelleken committed Jun 21, 2016
1 parent 552bd09 commit 3e1931b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Html2Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Html2Text
self::OPTION_TITLE => MB_CASE_TITLE,
);

const DEFAULT_OPTIONS = array(
private static $defaultOptions = array(
'do_upper' => true,
'do_underscores' => true,
'do_links' => 'inline',
Expand Down Expand Up @@ -289,7 +289,7 @@ public function __construct($html = '', $options = array())
call_user_func_array(array($this, 'legacyConstruct'), func_get_args());
} else {
$this->html = $html;
$this->options = array_replace_recursive(self::DEFAULT_OPTIONS, $options);
$this->options = array_replace_recursive(self::$defaultOptions, $options);
}
}

Expand Down Expand Up @@ -864,6 +864,6 @@ protected function pregPreCallback()
private function legacyConstruct($html = '', $fromFile = false, array $options = array())
{
$this->set_html($html, $fromFile);
$this->options = array_merge(self::DEFAULT_OPTIONS, $options);
$this->options = array_merge(self::$defaultOptions, $options);
}
}

0 comments on commit 3e1931b

Please sign in to comment.