Title: PHP Deprecated Errors &amp; Notices in PHP 8.2
Last modified: January 5, 2024

---

# PHP Deprecated Errors & Notices in PHP 8.2

 *  [hemasusi](https://wordpress.org/support/users/hemasusi/)
 * (@hemasusi)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/)
 * Hi ,
 * In my WP site (6.4.0) , after the upgrade of PHP 8.2 from 7.4, i am seeing deprecated
   errors/notices when enable the debug mode.
 * Below are some samples,
 * [05-Jan-2024 09:25:01 UTC] PHP Deprecated: Method ReflectionParameter::getClass()
   is deprecated in /code/wp-content/themes/****/vendor/illuminate/container/Container.
   php on line 900
   [05-Jan-2024 09:25:01 UTC] PHP Notice: file_get_contents(): Read
   of 8192 bytes failed with errno=21 Is a directory in /code/wp-includes/functions.
   php on line 4593[05-Jan-2024 09:25:01 UTC] PHP Notice: Error when decoding a 
   JSON file at path /code/wp-content/themes/****/resources: Syntax error in /code/
   wp-includes/functions.php on line 4601
 * [05-Jan-2024 13:23:06 UTC] PHP Deprecated: Return type of Illuminate\Config\Repository::
   offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(
   mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute
   should be used to temporarily suppress the notice in /code/wp-content/themes/****/
   vendor/illuminate/config/Repository.php on line 164
   [05-Jan-2024 13:23:06 UTC]
   PHP Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key)
   should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void,
   or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress
   the notice in /code/wp-content/themes/****/vendor/illuminate/config/Repository.
   php on line 175
 * Should i avoid these errors by disable debug mode ? or need to fix it?
 * kindly answer.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17320856)
 * The issue is in your theme. You should contact the theme’s developers. (Why did
   you *** out the theme name?)
 *  Thread Starter [hemasusi](https://wordpress.org/support/users/hemasusi/)
 * (@hemasusi)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17320967)
 * No, its not in my theme..
 * We are using custom theme , theme folder name is our project name. Thats why 
   hided that name with ***.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17321028)
 * The coding deprecation issues are in your theme.
 * “Should i avoid these errors by disable debug mode ? or need to fix it?”
 * You can ignore them for now by disabling debug, but eventually, you’ll have to
   fix it.
 *  Thread Starter [hemasusi](https://wordpress.org/support/users/hemasusi/)
 * (@hemasusi)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17321049)
 * Then what about below error, its showing in wp-includes/functions.php
 * [05-Jan-2024 09:25:01 UTC] PHP Notice: Error when decoding a JSON file at path/
   code/wp-content/themes/****/resources: Syntax error in /code/wp-includes/functions.
   php on line 4601
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17321094)
 * WP core is compatible with 8.2. You need to look at how you call a function in
   your theme. I note that you say you’re on 6.4.0. Update WP to the current version
   first. Maybe there was a bug fix in the last couple of point releases relevant
   to this.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17321533)
 * The error in functions.php is because passing your theme’s JSON file to `json_decode()`
   resulted in an error. `json_decode()` is a native PHP function, not a WP function.
   If `json_decode()` cannot correctly parse your JSON file, it’s still an issue
   with your theme, not functions.php.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP Deprecated Errors & Notices in PHP 8.2’ is closed to new replies.

## Tags

 * [deprecation](https://wordpress.org/support/topic-tag/deprecation/)
 * [notice](https://wordpress.org/support/topic-tag/notice/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 8 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-errors-notices-in-php-8-2/#post-17321533)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
