diff --git a/composer.json b/composer.json index ca3ae58..83e87fa 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": ">=5.6.0", + "php": ">=7.4.0", "ext-mbstring": "*", "ext-pcre": "*" }, diff --git a/src/Parser.php b/src/Parser.php index 439a312..e80a6a6 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -129,7 +129,7 @@ public function __construct($format = 'object', $path = null) */ public function setFormat($format = 'object') { - $this->format = filter_var($format, FILTER_SANITIZE_STRING); + $this->format = filter_var($format, FILTER_UNSAFE_RAW); } /** @@ -142,7 +142,7 @@ public function setCachePath($path = null) if (is_null($path)) { $this->path = sys_get_temp_dir(); } else { - $this->path = filter_var($path, FILTER_SANITIZE_STRING); + $this->path = filter_var($path, FILTER_UNSAFE_RAW); } } @@ -396,7 +396,7 @@ private function catchTlds($existFile) */ public function setEncodng($encoding = 'utf-8') { - $this->encoding = filter_var($encoding, FILTER_SANITIZE_STRING); + $this->encoding = filter_var($encoding, FILTER_UNSAFE_RAW); } /**