# Sage 9 file_get_contents warnings after update WP to 6.3

**URL:** https://discourse.roots.io/t/sage-9-file-get-contents-warnings-after-update-wp-to-6-3/25800
**Category:** sage
**Tags:** sage9
**Created:** 2023-08-14T09:47:48Z
**Posts:** 10
**Showing post:** 5 of 10

## Post 5 by @hostis912 — 2023-08-14T15:37:39Z

In Wordpress 6.3 the code in the file class-wp-theme-json-resolver.php was changed.

```
...
$theme_json_file = static::get_file_path_from_theme( 'theme.json' );
$wp_theme = wp_get_theme();
if ( '' !== $theme_json_file ) {
	$theme_json_data = static::read_json_file( $theme_json_file );
...
```

Is now:

```
...
$wp_theme = wp_get_theme();
$theme_json_file = $wp_theme->get_file_path( 'theme.json' );
if ( is_readable( $theme_json_file ) ) {
	$theme_json_data = static::read_json_file( $theme_json_file );
...
```

If you put a theme.json in /themes/themename/resources, nothing happens. You get back an empty array. But if you change `$theme_json_file = $wp_theme->get_file_path( 'theme.json' );` to `$theme_json_file = '/srv/www/.../current/web/app/themes/...-theme/resources/theme.json';` the warnings are gone .

But that is not a good solution :frowning:

---

_[View the full topic](https://discourse.roots.io/t/sage-9-file-get-contents-warnings-after-update-wp-to-6-3/25800)._
