Title: PHP Fatal Error: Uncaught TypeError
Last modified: February 20, 2018

---

# PHP Fatal Error: Uncaught TypeError

 *  Resolved [Chris McCreery](https://wordpress.org/support/users/chrismccreery/)
 * (@chrismccreery)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-2/)
 * When attempting to create a new page or post I am getting 500 error.
    Using latest
   version of Yoast WordPress SEO. When I disable the plugin the error disappears
   and everything works fine.
 * `[Tue Feb 20 17:11:01.263902 2018] [:error] [pid 30731] PHP Fatal error: Uncaught
   TypeError: Argument 2 passed to WPSEO_Link_Watcher::save_post() must be an instance
   of WP_Post, null given in /nas/content/live/sporttravel/wp-content/plugins/wordpress-
   seo/admin/links/class-link-watcher.php:41\nStack trace:\n#0 [internal function]:
   WPSEO_Link_Watcher->save_post(0, NULL)\n#1 /nas/content/live/sporttravel/wp-includes/
   class-wp-hook.php(288): call_user_func_array(Array, Array)\n#2 /nas/content/live/
   sporttravel/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, 
   Array)\n#3 /nas/content/live/sporttravel/wp-includes/plugin.php(453): WP_Hook-
   >do_action(Array)\n#4 /nas/content/live/sporttravel/wp-includes/post.php(3581):
   do_action(‘save_post’, 0, NULL, false)\n#5 /nas/content/live/sporttravel/wp-admin/
   includes/post.php(608): wp_insert_post(Array)\n#6 /nas/content/live/sporttravel/
   wp-admin/post-new.php(70): get_default_post_to_edit(‘post’, true)\n#7 {main}\
   n thrown in /nas/content/live/sporttravel/wp-content/plugins/wordpress-seo/admin/
   links/class-link-watcher.php on line 41, referer:

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

 *  [Rumejan](https://wordpress.org/support/users/onlyincebu/)
 * (@onlyincebu)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-2/#post-9996694)
 * This is most likely caused by a conflict with your other plugins or your theme.
   Try running a [conflict check](https://kb.yoast.com/kb/how-to-check-for-plugin-conflicts/).
 *  Thread Starter [Chris McCreery](https://wordpress.org/support/users/chrismccreery/)
 * (@chrismccreery)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-2/#post-10007525)
 * I disabled all plugins and it works properly. With only Yoast enabled it produces
   the error. This was also tested using the Twenty 17 theme and produced the same
   error.
 *  [Jerlyn](https://wordpress.org/support/users/jerparx/)
 * (@jerparx)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-2/#post-10008403)
 * Hi [@chrismccreery](https://wordpress.org/support/users/chrismccreery/),
 * Can you please confirm if you are running the latest WordPress version 4.9.4 
   and Yoast SEO 6.3.1?
    If everything is updated and the issue persists, can you
   check if clearing your site’s cache resolves the issue?
 *  Thread Starter [Chris McCreery](https://wordpress.org/support/users/chrismccreery/)
 * (@chrismccreery)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-2/#post-10009050)
 * I had a database issue where all the indices and primary keys were missing after
   the database was migrated to a new server. After fixing this everything worked
   properly.

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

The topic ‘PHP Fatal Error: Uncaught TypeError’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Chris McCreery](https://wordpress.org/support/users/chrismccreery/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-2/#post-10009050)
 * Status: resolved