0

Hi i have a lot of lines like this in my wordpress theme (it is old) and it gives me many errors.

The main culprit is the create_function part.

error says: PHP Deprecated: Function create_function() is deprecated

how would i change this:

$conditional_function = create_function('', 'return '.$tpl->menu[$name]['state_rule'].';');

to work with php 8?

thanks

tried changing code but it breaks the site

  • 1
    Does this answer your question? [PHP 7.2 Function create\_function() is deprecated](https://stackoverflow.com/questions/48161526/php-7-2-function-create-function-is-deprecated) – Shoelaced Nov 19 '22 at 21:38

0 Answers0