• Oh, I am aware Montezuma is no longer a supported Theme but my WordPress provider automatically upgraded the Server’s PHP from 7.4 to 8.1 which has caused the E_ERROR as follows :

    Error Details
    =============
    An error of type E_ERROR was caused in line 173 of the file /home/s1monloc/public_html/wp-content/themes/montezuma/includes/parse_php.php. Error message: Uncaught Error: Call to undefined function create_function() in /home/s1monloc/public_html/wp-content/themes/montezuma/includes/parse_php.php:173

    Stack trace:
    #0 [internal function]: bfa_parse_php_string(Array)
    #1 /home/s1monloc/public_html/wp-content/themes/montezuma/includes/parse_php.php(211): preg_replace_callback(‘/\\`

    As a temporary fix the site is running 7.4 again successfully but can I ask please if anyone else experiencing the same with their Montezuma installation eh ?

    TIA !

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the same issue and am looking for a replacement theme that is compatible with php8. Any suggestions?

    I’ve fixed the theme to work under PHP 8.1.

    The compatibility problem is the deprecation of the PHP 7.x create_function().

    You have to replace create_function() with function():

    Ie.
    create_function( ‘$var’, “php code;” )
    with
    function($var) { php code; }

    I’ve fixed it only on these files and it works again:

    wp-content/themes/montezuma/includes/parse_php.php
    wp-content/themes/montezuma/includes/menus.php
    wp-content/themes/montezuma/functions.php

    Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘E_ERROR with PHP 8.1 upgrade from 7.4’ is closed to new replies.