Support » Localhost Installs » Warning: Creating default object from empty value in C:\wamp\www\wordpress\wp-ad

• Guys plz help m new to making website and wordpress using wamp local host. Suddenly getting error message when i try to click on new post. The Error is as Follows

1. Warning: Creating default object from empty value in C:\wamp\www\wordpress\wp-admin\includes\post.php on line 641

2. Warning: Invalid argument supplied for foreach() in C:\wamp\www\wordpress\wp-content\plugins\wordpress-seo\admin\metabox\class-metabox.php on line 1067

can someone plz let me know what should i do?

Viewing 3 replies - 1 through 3 (of 3 total)
• DionDesigns

(@diondesigns)

By any chance are you using the release candidate of PHP 7.2? I can’t speak for (2) since I neither use nor recommend Yoast SEO, but the error in (1) could be due to some changes in PHP 7.2.

The errors could also be caused by your not loading all the core DLL files for PHP. That would be a WAMP installation/setup error, so if you’re not using PHP 7.2, then you might want to check the WAMP support site.

yohan89

(@yohan89)

Dear Dion thanx for the reply, Let me descirbe the errors in detail

PHP Warning: Creating default object from empty value in C:\wamp\www\wordpress\wp-admin\includes\post.php on line 641
Stack trace:

PHP Warning: Invalid argument supplied for foreach() in C:\wamp\www\wordpress\wp-content\plugins\wordpress-seo\admin\metabox\class-metabox.php on line 1067
Stack trace:
5. WP_Hook->do_action() C:\wamp\www\wordpress\wp-includes\plugin.php:453
6. WP_Hook->apply_filters() C:\wamp\www\wordpress\wp-includes\class-wp-hook.php:323
7. call_user_func_array:{C:\wamp\www\wordpress\wp-includes\class-wp-hook.php:298}() C:\wamp\www\wordpress\wp-includes\class-wp-hook.php:298
8. WPSEO_Metabox->enqueue() C:\wamp\www\wordpress\wp-includes\class-wp-hook.php:298
Ignore
Sep 27, 12:15:11
WordPress database error Duplicate entry ’92’ for key ‘PRIMARY’ for query INSERT INTO `wp_posts` (`post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_content_filtered`, `post_title`, `post_excerpt`, `post_status`, `post_type`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_parent`, `menu_order`, `post_mime_type`, `guid`) VALUES (1, ‘2017-09-27 12:15:11’, ‘0000-00-00 00:00:00’, ”, ”, ‘Auto Draft’, ”, ‘auto-draft’, ‘post’, ‘open’, ‘open’, ”, ”, ”, ”, ‘2017-09-27 12:15:11’, ‘0000-00-00 00:00:00’, 0, 0, ”, ”) made by get_default_post_to_edit, wp_insert_post

yohan89

(@yohan89)

The Second error got resolved, it was due to SEO plugin. But the First error as listed below remains the same.

PHP Warning: Creating default object from empty value in C:\wamp\www\wordpress\wp-admin\includes\post.php on line 641
Stack trace: