@@ -179,7 +179,7 @@ public function Header(): void
179179 $ l = $ this ->lMargin ;
180180 foreach ($ this ->colTitles as $ col => $ txt ) {
181181 $ this ->setXY ($ l , $ this ->tMargin );
182- $ this ->MultiCell ($ this ->tablewidths [$ col ], $ this ->FontSizePt , $ txt );
182+ $ this ->MultiCell ($ this ->tablewidths [$ col ], $ this ->FontSizePt , $ txt ?? ' NULL ' );
183183 $ l += $ this ->tablewidths [$ col ];
184184 $ GLOBALS ['maxY ' ] = $ GLOBALS ['maxY ' ] < $ this ->GetY () ? $ this ->GetY () : $ GLOBALS ['maxY ' ];
185185 }
@@ -191,7 +191,7 @@ public function Header(): void
191191 $ this ->setXY ($ l , $ this ->tMargin );
192192 $ this ->Cell ($ this ->tablewidths [$ col ], $ GLOBALS ['maxY ' ] - $ this ->tMargin , '' , 1 , 0 , 'L ' , true );
193193 $ this ->setXY ($ l , $ this ->tMargin );
194- $ this ->MultiCell ($ this ->tablewidths [$ col ], $ this ->FontSizePt , $ txt , 0 , 'C ' );
194+ $ this ->MultiCell ($ this ->tablewidths [$ col ], $ this ->FontSizePt , $ txt ?? ' NULL ' , 0 , 'C ' );
195195 $ l += $ this ->tablewidths [$ col ];
196196 }
197197
@@ -238,7 +238,7 @@ public function morepagestable(int|float $lineheight = 8): void
238238 $ this ->page = $ currpage ;
239239 $ this ->setXY ($ l , $ h );
240240 if ($ this ->tablewidths [$ col ] > 0 ) {
241- $ this ->MultiCell ($ this ->tablewidths [$ col ], $ lineheight , $ txt , 0 , $ this ->colAlign [$ col ]);
241+ $ this ->MultiCell ($ this ->tablewidths [$ col ], $ lineheight , $ txt ?? ' NULL ' , 0 , $ this ->colAlign [$ col ]);
242242 $ l += $ this ->tablewidths [$ col ];
243243 }
244244
@@ -375,7 +375,7 @@ public function getTriggers(string $db, string $table): void
375375 $ this ->tablewidths [$ col ],
376376 // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
377377 $ this ->FontSizePt ,
378- $ txt ,
378+ $ txt ?? ' NULL ' ,
379379 0 ,
380380 $ this ->colAlign [$ col ],
381381 );
@@ -605,7 +605,7 @@ public function getTableDef(
605605 $ this ->tablewidths [$ col ],
606606 // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
607607 $ this ->FontSizePt ,
608- $ txt ,
608+ $ txt ?? ' NULL ' ,
609609 0 ,
610610 $ this ->colAlign [$ col ],
611611 );
@@ -754,7 +754,7 @@ public function mysqlReport(string $query): void
754754 while ($ row = $ this ->results ->fetchRow ()) {
755755 foreach ($ colFits as $ key => $ val ) {
756756 /** @var float $stringWidth */
757- $ stringWidth = $ this ->GetStringWidth ($ row [$ key ]);
757+ $ stringWidth = $ this ->GetStringWidth ($ row [$ key ] ?? ' NULL ' );
758758 $ stringWidth += 6 ;
759759 if ($ adjustingMode && ($ stringWidth > $ sColWidth )) {
760760 // any column whose data's width is bigger than
0 commit comments