• I updated the theme on 5/18, and now the twentyseventeen error_log is logging errors in functions.php:

    [19-May-2019 01:19:03 UTC] PHP Notice: Undefined index: wp_version in /home/…/wp-content/themes/twentyseventeen/functions.php on line 15
    [19-May-2019 01:19:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_template_directory() in /home/…/wp-content/themes/twentyseventeen/functions.php:16
    Stack trace:
    #0 {main}
    thrown in /home/…/wp-content/themes/twentyseventeen/functions.php on line 16
    [19-May-2019 01:20:21 UTC] PHP Notice: Undefined index: wp_version in /home/…/wp-content/themes/twentyseventeen/functions.php on line 15
    [19-May-2019 01:20:21 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_template_directory() in /…/wp-content/themes/twentyseventeen/functions.php:16
    Stack trace:
    #0 {main}
    thrown in /home/…/wp-content/themes/twentyseventeen/functions.php on line 16
    [19-May-2019 01:21:54 UTC] PHP Notice: Undefined index: wp_version in /home/…/wp-content/themes/twentyseventeen/functions.php on line 15
    [19-May-2019 01:21:54 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_template_directory() in /home/…/wp-content/themes/twentyseventeen/functions.php:16
    Stack trace:
    #0 {main}
    thrown in /home/…/wp-content/themes/twentyseventeen/functions.php on line 16

    The lines in error are:
    /**
    * Twenty Seventeen only works in WordPress 4.7 or later.
    */
    if ( version_compare( $GLOBALS[‘wp_version’], ‘4.7-alpha’, ‘<‘ ) ) {
    require get_template_directory() . ‘/inc/back-compat.php’;
    return;
    }

    I also updated to WordPress 5.2, and php is at v7.0.33

    The site is up and running, however.

  • The topic ‘functions.php errors since update to Version: 2.2’ is closed to new replies.