We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02a65cf commit da605b5Copy full SHA for da605b5
1 file changed
src/MyPdf.php
@@ -1402,13 +1402,15 @@ public function createIndex(
1402
$this->Ln(10);
1403
1404
// get the number of bookmarks
1405
- $size=sizeof($this->outlines);
+ $size = sizeof($this->outlines);
1406
1407
- // get the size of the "P. xx" cell
1408
- if ($size > 0) {
1409
- $pageCellSize=$this->GetStringWidth('p. '.$this->outlines[$size-1]['p'])+2;
+ if ($size === 0) {
+ return;
1410
}
1411
-
+
+ // get the size of the "P. xx" cell
1412
+ $pageCellSize=$this->GetStringWidth('p. '.$this->outlines[$size-1]['p'])+2;
1413
1414
// Foreach bookmark
1415
for ($i=0; $i<$size; $i++) {
1416
// if we need a new page => add a new page
0 commit comments