• Sg Plombier

    (@sgplomber1)


    hello;
    i tried to add a page and the eror “Warning: Creating default object from empty value in /htdocs/wp-admin/includes/post.php on line 748” appear, i have got a large data.
    also i have got so many problems inthe website now like(the pages do not appear like it suppost to appear)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Alan Fuller

    (@alanfuller)

    Hi,

    I can’t fix your specifuc issue and I am sorry you are experiencing this however these are notices and warnings not errors.

    A production site should be set to not display warnings and notices.

    Notices and Warnings are to help developers clean up code issues e.g. the Notice might be that a function is deprecated in a future release. Or a Warning may be that a variable has not been set before being used.

    In general – on a production site – you should have Notices and Warning set not to display.

    This is easy to do, you can edit your wp-config.php file and set

    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', false);
    define('WP_DEBUG_DISPLAY', false);

    Or if that is too technical – just raise a support ticket to your host to ask them to suppress PHP Notices and Warnings.

    What you describe sounds like a typical experience for someone when the webhost moves your site to a modern version of PHP (the underlying language that WordPress uses).

    PHP has been constantly evolving over the last 5 years. The lifecycle of each version is relatively short, about 3 years from launch, over fixing errors, becoming mainstream, dropping to security support and finally being retired.

    WordPress core stays more or less in sync with this, but if you have plugins that make extensive use of various PHP functions and variable types, then that plugin may need to be updated at least a couple of times a year to work well.

    The PHP community is about to drop security maintenance of PHP 7.4 in 1-2 weeks from now, so many web hosts are now forcing their customers to PHP 8.0 or 8.1.

    You can hide warnings and notices, as Alan described above. But also: check if all your plugins and your theme are still being regularly maintained by their respective developer. If you’re using some commercial plugin, then you may need to pay for a new license in order to get access to latest updates.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: Creating default object from empty value in /htdocs/wp-admin/includes/p’ is closed to new replies.