QR code critical error

Formidable Forms Bug Released
16 January, 2024 22:23:06
Topics: 11
Messages: 30
I have a template that uses the QR code function. Its been working fine for a while but since the update to the latest version (Version 1.22.02) the template now has a fatal error:

Fatal error: Uncaught Error: Call to a member function qrcode() on null in /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/helper/e2pdf-field.php:376 Stack trace: #0 /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/extension/e2pdf-formidable.php(615): Helper_E2pdf_Field->render('https://www.sto...', Object(Extension_E2pdf_Formidable), Array) #1 /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/extension/e2pdf-formidable.php(285): Extension_E2pdf_Formidable->render_shortcodes('https://www.sto...', Array) #2 /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/model/e2pdf-extension.php(128): Extension_E2pdf_Formidable->render('[529 show="523"...', Array) #3 /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/model/e2pdf-template.php(562): Model_E2pdf_Extension->render('[529 show="523"...', Array) #4 /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/controller/frontend/e2pdf-download.php(179): Model_E2pdf_Template->fill() #5 /home/pladbuilder/public_ in /home/pladbuilder/public_html/wp-content/plugins/e2pdf/classes/helper/e2pdf-field.php on line 376


For a temporary fix I changed the line 376 to read:
if ($this->helper->load('qrcode')) {
$value = $this->helper->load('properties')->apply($field, $value);
$value = $this->helper->load('qrcode')->qrcode($extension->strip_shortcodes($value), $field);
}

Instead of:
case 'e2pdf-qrcode':
$value = $this->helper->load('properties')->apply($field, $value);
$value = $this->helper->load('qrcode')->qrcode($extension->strip_shortcodes($value), $field);
break;

But this is just a temporary fix of course.
16 January, 2024 23:34:53
E2Pdf
Support
Topics: 7
Messages: 3345
Hello,

Can you please update the plugin to the latest RC Version: 1.22.03 and see if the issue is resolved?
We would really appreciate your feedback at WordPress.org!
21 January, 2024 14:49:17
Topics: 11
Messages: 30
This solved the issue, thanks!