Initial assessment

Fatal error: Uncaught Error: Call to a member function …() on null

“Call to a member function …() on null” in WordPress: causes and what to check

Updated 2026-11-01

PHP throws this error when code calls a method on a variable that holds null instead of an object. In WordPress it often means a plugin or theme ran before the object it needs was created, or a lookup for a post, product or user returned nothing.

Which of these do you see?

The new version expects an object from another plugin or from WordPress that is not ready at that point.

The code expects a post, product or user that does not exist on those pages and does not check for it.

Common causes

Code runs too early: A plugin uses an object before WordPress or another plugin creates it.
Missing data: A query returned no post, product or user, and the code did not check the result.
Plugin conflict: One plugin removes or replaces an object that another plugin uses.
Incomplete update: Old and new files of the same plugin are mixed.

References

  1. Debugging in WordPress (Advanced Administration Handbook)
  2. Common WordPress errors (Advanced Administration Handbook)

Rather not fix it yourself? Let WP119 handle it automatically.

White screens and fatal errors (plugin conflicts, PHP version incompatibility) are handled automatically: on a copy of your site in the recovery station, the system turns on debug mode, finds the plugin or theme causing the error and deactivates it (not deleted); a white screen caused by exhausted memory is fixed by raising the memory limit. After the fix, the home page and inner pages are re-verified, and only then is the result written back to your host (in WP admin mode, a recovered package is delivered instead). Fixes are made on a copy of your site in the recovery station and written back only after re-verification passes. In your site’s database, the protected tables (members, comments, orders and form submissions) are copied as structure only. In SSH and FTP mode, the system creates a pre-recovery backup on your host before writing back and restores from it if verification after write-back fails. If the recovery cannot be completed, the recovery fee is refunded in full.

  1. Initial assessment: Site URL entry
  2. Copy to the recovery station: Work on a copy
  3. Diagnosis: Item-by-item checks
  4. Recovery and verification: Home and inner pages
  5. Write-back or delivery: Only after verification passes

Use WP119 when this error stops the site or the admin area from loading.

Check my site →
Initial assessment →