GravityPDF / gravity-pdf

Gravity PDF is the ultimate third-party PDF automation tool for generating digital PDFs using the popular form-builder plugin Gravity Forms.
https://gravitypdf.com
89 stars 20 forks source link

Fatal error on MPDF's Block Tag #1452

Closed jestonihpi closed 1 year ago

jestonihpi commented 1 year ago

Description We have received reports that there's an error in one of the MPDF's tag:

PHP Fatal error: Uncaught ValueError: str_repeat(): Argument #2 ($times) must be greater than or equal to 0 in /www/adoptionformychildcom_324/public/wp-content/plugins/gravity-forms-pdf-extended/vendor_prefixed/mpdf/mpdf/src/Tag/BlockTag.php:193

"PHP message: PHP Warning: Undefined array key -1 in /www/adoptionformychildcom_324/public/wp-content/plugins/gravity-forms-pdf-extended/vendor_prefixed/mpdf/mpdf/src/Tag/BlockTag.php

Which points to this code:

$ls = \str_repeat("  ", ($this->mpdf->listlvl - 1) * 2) . $blt . ' ';

Step To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

jakejackson1 commented 1 year ago

Not enough information.