I tried to activate an installed plugin and I got this error. I can't open the site again. I restarted my computer and load the localhost URL, got the same error below:
Fatal error: Uncaught Error: Call to undefined function create_function() in C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php:136 Stack trace: #0 C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php(441): stylepress_dtbaker_Shortcode_Google_Map->init() #1 C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\inc\class.plugin.php(184): require_once('C:\xampp\htdocs...') #2 C:\xampp\htdocs\university\wp-includes\class-wp-hook.php(307): DtbakerElementorManager->load_extensions('') #3 C:\xampp\htdocs\university\wp-includes\class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #4 C:\xampp\htdocs\university\wp-includes\plugin.php(476): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\university\wp-settings.php(598): do_action('init') #6 C:\xampp\htdocs\university\wp-config.php(96): require_once('C:\xampp\htdocs...') #7 C:\xampp\htdocs\university\wp-load.php(50): require_once('C:\xampp\htdocs...') #8 C:\xampp\htdocs\university\wp-blog-header.php(13): require_once('C:\xampp\htdocs...') #9 C:\xampp\htdocs\university\index.php(17): require('C:\xampp\htdocs...') #10 {main} thrown in C:\xampp\htdocs\university\wp-content\plugins\full-site-builder-for-elementor\extensions\google-maps\google-maps.php on line 136
It's difficult for me to troubleshoot for you specific use case - but here are some notes and tools that may help you decipher and fix this. The error is because you are running on PHP8 but your code has PHP7 incompatibilities.
The deprecated create_function() from > PHP7 needs replaced with an anonymous PHP8 function call.
For more information on this: see: PHP 7.2 Function create_function() is deprecated and: https://www.php.net/manual/en/function.create-function.php
If you want to dive in to the code itself to fix this:
You will likely have other deprecated functions in the code:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With