-
AuthorPosts
-
August 17, 2023 at 2:10 pm #1416478
Hello,
Our client has a multisite where the following error appeared on the German and Italian versions:
Deprecated: Function create_function() is deprecated in /srv/www/dia/dia.aau.at/html/staging1/wp-content/themes/enfold-child_de/functions.php on line 135
As a precaution, we generated a staging page and updated the entire pages. After the theme was finished and WordPress was also updated to 6.3, the aforementioned error message remained and another one appeared on every page and also in the backend:
Deprecated: Function Class avia_style_generator was called with an argument that is deprecated since version 5.3! Trying to set protected/private property: avia_style_generator::print_extra_output – will become unavailable in a future release. Check for a set method or a filter. in /srv/www/dia/dia.aau.at/html/staging1/wp-includes/functions.php on line 5737
How can you fix these errors?
Thank you in advance.August 17, 2023 at 2:19 pm #1416482Hey pirkerandrea,
The first warning is generated from your child theme, please refer to the code on line 135 in functions.php.
I’m not sure of the second warning though. Which version of the theme and PHP are you running?
Best regards,
RikardAugust 17, 2023 at 3:21 pm #1416487Hello Rikard,
The Theme Version is 5.6.5 and PHP is 7.4.
Best regards.
August 17, 2023 at 8:58 pm #1416507Hi,
Thanks for the update. What happens if you update your PHP version to 8.x? Also, do the warnings appear if you activate the parent theme?
Best regards,
RikardAugust 18, 2023 at 9:50 am #1416537Hello,
we are in the process of updating the PHP version. I will get back to you when this is complete.To revisit the first problem from the first message. The line on the respective pages says the following:
add_filter(‘pre_site_transient_update_core’, create_function(‘$a’, “return null;”));
What exactly is there to do?
Best regardsAugust 18, 2023 at 1:47 pm #1416546We have just been informed that it is not possible to use a different PHP version.
Kind regardsAugust 18, 2023 at 4:37 pm #1416564Hi,
Thanks for the update. The PHP version you are running is going to be obsolete soon, so you might want to change your hosting provider if 7.4 is the only PHP version they are offering.
You can easily check if the warnings are generated from your child theme by simply activating the parent theme. We can’t be responsible for custom code added to a child theme unfortunately. Maybe you could reach out to the person who wrote or added the code in question? https://www.php.net/manual/en/function.create-function.php
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.