PHP Fatal error
-
We are getting a PHP Fatal error when using this plugin now, the exact error is:
[22-Jul-2021 14:46:36 UTC] PHP Fatal error: Uncaught TypeError: Argument 3 passed to locate_block_template() must be of the type array, string given, called in /public_html/wp-includes/template.php on line 66 and defined in /public_html/wp-includes/block-template.php:22
So I tracked the issue down to file: nm-gift-registry-and-wishlist-lite/includes/class-nmgr-templates.php
on line 180 and you are passing a string value to get_query_template() for the second parameter but it has to be an array.
I fixed this temporarily by customizing the core file and adding:
if(!is_array($single_template) && !empty($single_template)){ $single_template = array($single_template); }
Can you please fix this for the next update?
- The topic ‘PHP Fatal error’ is closed to new replies.