Title: functions.php errors since update to Version: 2.2
Last modified: May 20, 2019

---

# functions.php errors since update to Version: 2.2

 *  [terry777](https://wordpress.org/support/users/terry777/)
 * (@terry777)
 * [7 years ago](https://wordpress.org/support/topic/functions-php-errors-since-update-to-version-2-2/)
 * 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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentyseventeen/4.1/screenshot.
   png)
 * Twenty Seventeen
 * [Support Threads](https://wordpress.org/support/theme/twentyseventeen/)
 * [Active Topics](https://wordpress.org/support/theme/twentyseventeen/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentyseventeen/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentyseventeen/reviews/)

## Tags

 * [error_log](https://wordpress.org/support/topic-tag/error_log/)

 * 0 replies
 * 1 participant
 * Last reply from: [terry777](https://wordpress.org/support/users/terry777/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/functions-php-errors-since-update-to-version-2-2/)
 * Status: not resolved