From 3e1931b4336b80ce0005d1b92c637b19f4f17b65 Mon Sep 17 00:00:00 2001 From: Lars Moelleken Date: Tue, 21 Jun 2016 12:21:05 +0200 Subject: [PATCH] [+]: changes for old php-versions --- src/Html2Text.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Html2Text.php b/src/Html2Text.php index f644430..13967ea 100644 --- a/src/Html2Text.php +++ b/src/Html2Text.php @@ -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', @@ -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); } } @@ -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); } }