Fatal error after upgrading to PHP 8

[ad_1]

After upgrading to PHP 8, when a user submits the form, the entry is created, but an error is displayed when trying to view the PDF. Here’s the error:

[23-Feb-2023 16:34:53 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "street" in /home/dp/public_html/wp-content/uploads/PDF_EXTENDED_TEMPLATES/employment_application.php:89
Stack trace:
#0 /home/dp/public_html/wp-content/plugins/gravity-forms-pdf-extended/src/Helper/Helper_PDF.php(860): include()
#1 /home/dp/public_html/wp-content/plugins/gravity-forms-pdf-extended/src/Helper/Helper_PDF.php(262): GFPDF\Helper\Helper_PDF->load_html(Array)
#2 /home/dp/public_html/wp-content/plugins/gravity-forms-pdf-extended/src/View/View_PDF.php(217): GFPDF\Helper\Helper_PDF->render_html(Array)
#3 /home/dp/public_html/wp-content/plugins/gravity-forms-pdf-extended/src/Model/Model_PDF.php(241): GFPDF\View\View_PDF->generate_pdf(Array, Array)
#4 /home/dp/public_html/wp-content/plugins/gravity-forms-pdf-extended/src/Controller/Controller_PDF.php(243): GFPDF\Model\Model_PDF->process_pdf('5ac7b075931cc', 11374, 'view')
#5 /home/dp/public_html/wp-includes/class-wp-hook.php(308): GFPDF\Controller\Controller_PDF->process_pdf_endpoint(Object(WP))
#6 /home/dp/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#7 /home/dp/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#8 /home/dp/public_html/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
#9 /home/dp/public_html/wp-includes/class-wp.php(780): WP->parse_request('')
#10 /home/dp/public_html/wp-includes/functions.php(1332): WP->main('')
#11 /home/dp/public_html/wp-blog-header.php(16): wp()
#12 /home/dp/public_html/index.php(17): require('/home/dp/public...')
#13 {main}
  thrown in /home/dp/public_html/wp-content/uploads/PDF_EXTENDED_TEMPLATES/employment_application.php on line 89

Rolling back to PHP 7.4 fixes it.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer