diff --git a/src/Html2Pdf.php b/src/Html2Pdf.php index dcf3c8f..85b9fc8 100755 --- a/src/Html2Pdf.php +++ b/src/Html2Pdf.php @@ -381,11 +381,11 @@ protected function getTagObject($tagName) /** * set the debug mode to On * - * @param DebugInterface $debugObject + * @param DebugInterface|null $debugObject * * @return Html2Pdf $this */ - public function setModeDebug(DebugInterface $debugObject = null) + public function setModeDebug($debugObject = null) { if (is_null($debugObject)) { $this->debug = new Debug(); diff --git a/src/Locale.php b/src/Locale.php index ffa9a76..226ae23 100644 --- a/src/Locale.php +++ b/src/Locale.php @@ -81,7 +81,12 @@ public static function load($code) self::$list = array(); $handle = fopen($file, 'r'); while (!feof($handle)) { - $line = fgetcsv($handle); + if (PHP_VERSION >= 80400) { + // As of PHP 8.4.0, depending on the default value of escape is deprecated. + $line = fgetcsv($handle, null, ',', '"', '\\'); + } else { + $line = fgetcsv($handle); + } if (!is_array($line) || count($line) !=2) { continue; }