Support » Fixing WordPress » Warning: Creating default object from empty value in /home…wp-admin/includes/p

  • I’ve scoured WP forums and the only post relevant doesn’t seem to have an answer either – I’m at the end of my tether!! Please advise what I can do!!

    I’m currently using the Customizr theme. I’ve updated the PHP, reinstalled the latest version of WP. Loaded the HealthCheck plug in – nothing showing as an error. Cleared caaches, repeated everything again. I have used Troubleshoot to check with a new theme. Still doesn’t work. The hosting company insist everything is OK at their end and that it is a WP error.

    Details from Healthcheck:

    
    
    				### WordPress ###
    
    Version: 4.9.8
    Language: en_GB
    Permalink structure: 
    Is this site using HTTPS?: Yes
    Can anyone register on this site?: No
    Default comment status: closed
    Is this a multisite?: No
    User Count: 4
    Communication with WordPress.org: WordPress.org is reachable
    Create loopback requests: The loopback request to your site completed successfully.
    
    ### Installation size ###
    
    Uploads directory: 179.15 MB
    Themes directory: 21.23 MB
    Plugins directory: 201.31 MB
    Database size: 6.28 MB
    Whole WordPress Directory: 1.37 GB
    Total installation size: 1.38 GB
    
    ### Active theme ###
    
    Name: Customizr (Runnymede SC)
    Version: 1.0.0
    Author: Chris Pope (Runnymede SC)
    Author website: Undefined
    Parent theme: Customizr
    Supported theme features: automatic-feed-links, post-formats, post-thumbnails, title-tag, customize-selective-refresh-widgets, menus, editor-style, jetpack, bbpress, buddy-press, qtranslate-x, polylang, wpml, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, the-events-calendar, optimize-press, woo-sensei, visual-composer, disqus, uris, tc-unlimited-featured-pages, learnpress, coauthors, widgets
    
    ### Other themes (2) ###
    
    Customizr (customizr): Version 4.1.13 by nikeo (latest version: 4.1.19)
    Twenty Seventeen (twentyseventeen): Version 1.7 by the WordPress team
    
    ### Must Use Plugins (1) ###
    
    Health Check Troubleshooting Mode: Version 1.5.0
    
    ### Active Plugins (6) ###
    
    All-in-One Event Calendar by Time.ly: Version 2.5.32 by Time.ly Network Inc.
    Classic Editor: Version 0.4 by WordPress Contributors
    Contact Form 7: Version 5.0.4 by Takayuki Miyoshi
    Health Check & Troubleshooting: Version 1.2.1 by The WordPress.org community
    TablePress: Version 1.9.1 by Tobias Bäthge
    WPForms Lite: Version 1.4.9 by WPForms
    
    ### Media handling ###
    
    Active editor: WP_Image_Editor_GD
    Imagick Module Version: Imagick not available
    ImageMagick Version: Imagick not available
    GD Version: bundled (2.1.0 compatible)
    Ghostscript Version: 9.07
    
    ### Server ###
    
    Server architecture: Linux 3.10.0-427.18.2.lve1.4.27.el7.x86_64 x86_64
    PHP Version: 7.2.11 (Supports 64bit values)
    PHP SAPI: cgi-fcgi
    PHP max input variables: 1000
    PHP time limit: 30
    PHP memory limit: 256M
    Max input time: -1
    Upload max filesize: 2M
    PHP post max size: 8M
    cURL Version: 7.61.1 OpenSSL/1.0.2p
    SUHOSIN installed: No
    Is the Imagick library available: No
    Htaccess rules: Custom rules have been added to your htaccess file
    
    ### Database ###
    
    Extension: mysqli
    Server version: 5.6.41
    Client version: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
    Database prefix: wprsc_
    
    ### WordPress constants ###
    
    ABSPATH: /home/runnymed/public_html/
    WP_HOME: Undefined
    WP_SITEURL: Undefined
    WP_DEBUG: Disabled
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG_DISPLAY: Enabled
    WP_DEBUG_LOG: Disabled
    SCRIPT_DEBUG: Disabled
    WP_CACHE: Disabled
    CONCATENATE_SCRIPTS: Undefined
    COMPRESS_SCRIPTS: Undefined
    COMPRESS_CSS: Undefined
    WP_LOCAL_DEV: Undefined
    
    ### File system permissions ###
    
    The main WordPress directory: Writable
    The wp-content directory: Writable
    The uploads directory: Writable
    The plugins directory: Writable
    The themes directory: Writable
    The Must Use Plugins directory: Writable
    
    

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • I also can’t add a page to the main menu. Nothing happens.

    I am also getting similar warnings (but I’m using WordPress 2.9.2). They don’t seem to have any effect on the site or my admin:

    Warning: Creating default object from empty value in ............./wordpress/wp-admin/includes/post.php on line 342

    This item at stackoverflow.com looks relevant, but that implies that you have been tweaking the php code in your theme?

    Thanks Roadie. I don’t have the skills to edit any php code. Had a look at Stackflow and found this fix:

    open your wordpress wp-config.php file, then find

    define(‘WP_DEBUG’, false);
    replace it with below code,

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

    It worked and I can now save a page but my Admin rights are not working properly as there’s no option to ‘publish’. Am checking forums for fix for this.

    Am still having problems with not being able to add an item to the main menu! AAARGH!!!!

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