From 7e7858ed945715262cb09a9b9d9f973d684d714d Mon Sep 17 00:00:00 2001 From: MGS Creativa Date: Fri, 5 Dec 2025 10:28:04 -0300 Subject: [PATCH] Update xlsxwriter.class.php Avoid PHP deprecation warning Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in xlsxwriter.class.php on line 767 --- xlsxwriter.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xlsxwriter.class.php b/xlsxwriter.class.php index e4bd345aa..359a20fa4 100644 --- a/xlsxwriter.class.php +++ b/xlsxwriter.class.php @@ -763,6 +763,10 @@ public static function sanitize_sheetname($sheetname) //------------------------------------------------------------------ public static function xmlspecialchars($val) { + if ($val === null) { + return ''; + } + //note, badchars does not include \t\n\r (\x09\x0a\x0d) static $badchars = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f"; static $goodchars = " ";