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