PHP error

htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated

/media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(760)

748         static $goodchars = '        ';
749         $sheetname = strtr($sheetname, $badchars, $goodchars);
750         $sheetname = function_exists('mb_substr') ? mb_substr($sheetname, 0, 31) : substr($sheetname, 0, 31);
751         $sheetname = trim(trim(trim($sheetname),"'"));//trim before and after trimming single quotes
752         return !empty($sheetname) ? $sheetname : 'Sheet'.((rand()%900)+100);
753     }
754     //------------------------------------------------------------------
755     public static function xmlspecialchars($val)
756     {
757         //note, badchars does not include \t\n\r (\x09\x0a\x0d)
758         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";
759         static $goodchars = "                              ";
760         return strtr(htmlspecialchars($val, ENT_QUOTES | ENT_XML1), $badchars, $goodchars);//strtr appears to be faster than str_replace
761     }
762     //------------------------------------------------------------------
763     public static function array_first_key(array $arr)
764     {
765         reset($arr);
766         $first_key = key($arr);
767         return $first_key;
768     }
769     //------------------------------------------------------------------
770     private static function determineNumberFormatType($num_format)
771     {
772         $num_format = preg_replace("/\[(Black|Blue|Cyan|Green|Magenta|Red|White|Yellow)\]/i", "", $num_format);

Stack Trace

#0
+
 /media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(760): htmlspecialchars(null, 19)
755     public static function xmlspecialchars($val)
756     {
757         //note, badchars does not include \t\n\r (\x09\x0a\x0d)
758         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";
759         static $goodchars = "                              ";
760         return strtr(htmlspecialchars($val, ENT_QUOTES | ENT_XML1), $badchars, $goodchars);//strtr appears to be faster than str_replace
761     }
762     //------------------------------------------------------------------
763     public static function array_first_key(array $arr)
764     {
765         reset($arr);
#1
+
 /media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(613): XLSXWriter::xmlspecialchars(null)
608     {
609         $app_xml="";
610         $app_xml.='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n";
611         $app_xml.='<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">';
612         $app_xml.='<TotalTime>0</TotalTime>';
613         $app_xml.='<Company>'.self::xmlspecialchars($this->company).'</Company>';
614         $app_xml.='</Properties>';
615         return $app_xml;
616     }
617 
618     protected function buildCoreXML()
#2
+
 /media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(98): XLSXWriter->buildAppXML()
093         $zip = new ZipArchive();
094         if (empty($this->sheets))                       { self::log("Error in ".__CLASS__."::".__FUNCTION__.", no worksheets defined."); return; }
095         if (!$zip->open($filename, ZipArchive::CREATE)) { self::log("Error in ".__CLASS__."::".__FUNCTION__.", unable to create zip."); return; }
096 
097         $zip->addEmptyDir("docProps/");
098         $zip->addFromString("docProps/app.xml" , self::buildAppXML() );
099         $zip->addFromString("docProps/core.xml", self::buildCoreXML());
100 
101         $zip->addEmptyDir("_rels/");
102         $zip->addFromString("_rels/.rels", self::buildRelationshipsXML());
103 
2023-11-30 17:25:54 nginx/1.22.1 Yii Framework/1.1.29