• Hi,

    Just an Heads Up.

    I am using WP version 6.4.0 and PHP 8.2.Here are the deprecation errors that are showing,

    PHP Notice: file_get_contents(): Read of 12288 bytes failed with errno=21 Is a directory in /code/wp-includes/functions.php on line 4593

    Notice: Error when decoding a JSON file at path /code/wp-content/themes/****/resources: Syntax error in /code/wp-includes/functions.php on line 4596

    PHP Deprecated: mysqli_real_connect(): Passing null to parameter #5 ($database) of type ?string is deprecated in /code/wp-includes/class-wpdb.php on line 1973

    PHP Deprecated: mysqli_real_connect(): Passing null to parameter #7 ($socket) of type ?string is deprecated in /code/wp-includes/class-wpdb.php on line 1973

    PHP Notice: Function map_meta_cap was called incorrectly. The post type wc_user_membership is not registered, so it may not be reliable to check the capability read_post against a post of that type. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.) in /code/wp-includes/functions.php on line 6031

    PHP Notice: Function map_meta_cap was called incorrectly. The post type wc_user_membership is not registered, so it may not be reliable to check the capability edit_post against a post of that type. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.) in /code/wp-includes/functions.php on line 6031

    PHP Deprecated: mysqli_real_connect(): Passing null to parameter #5 ($database) of type ?string is deprecated in /code/wp-includes/class-wpdb.php on line 1973

    PHP Deprecated: mysqli_real_connect(): Passing null to parameter #7 ($socket) of type ?string is deprecated in /code/wp-includes/class-wpdb.php on line 1973

    I know that PHP 8.2 support is still in beta. Hope it will clear in next WP releases.

    Thanks.

    • This topic was modified 9 months, 2 weeks ago by hemasusi.
    • This topic was modified 9 months, 2 weeks ago by hemasusi.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You are welcome to store such comments in Core Trac so that developers can view and evaluate them: https://core.trac.www.ads-software.com/newticket

    However, some of your examples are very general and could also be caused by incorrect data in your project’s database. I’m already using WordPress with PHP 8.2 for some projects and haven’t seen these yet. If you can reproduce this in a new WordPress installation without any plugins, report it as described.

    Moderator bcworkz

    (@bcworkz)

    WP core is more than 98% compatible with PHP 8.2. The problems you’re encountering are due to incompatibility of your theme or of your plugins. Narrow down which ones. As a test, switch to a default Twenty* theme and deactivate all plugins. The notices and what not will go away. Restore your normal theme and plugins, one at a time, checking for notices after each. When they reappear, the last activated module was the cause. Take up the issue through that module’s dedicated support channel.

    Thread Starter hemasusi

    (@hemasusi)

    Hi,

    Noted, also shall i update WP from 6.4.0 to 6.4.3? Is it compatible to PHP 8.2 ?

    There are only marginal differences between the two versions in terms of compatibility with PHP. However, you should update for security reasons alone.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP 8.2 Deprecation Errors and Notices’ is closed to new replies.