Title: PHP error
Last modified: April 26, 2026

---

# PHP error

 *  Resolved [Mordechaj](https://wordpress.org/support/users/mordechaj/)
 * (@mordechaj)
 * [1 month ago](https://wordpress.org/support/topic/php-error-707/)
 * Hello
 * An error occurred:
 * **Warning**: Attempt to read property “ID” on null in **/home/platne/serwer55633/
   public_html/darkorbitwiki/wp-content/plugins/all-in-one-seo-pack/app/Common/Social/
   Image.php** on line **74**
 * I think the error occurs when I connect to google search concole, but I’m not
   sure.
 * What should I do?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-707%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [4 weeks, 1 day ago](https://wordpress.org/support/topic/php-error-707/#post-18892396)
 * Hi [@mordechaj](https://wordpress.org/support/users/mordechaj/) ,
 * Thanks for bringing this to our attention!
 * **What’s happening**
 * The warning you’re seeing:
 *     ```wp-block-code
       Warning: Attempt to read property "ID" on null in .../all-in-one-seo-pack/app/Common/Social/Image.php on line 74
       ```
   
 * is caused by AIOSEO trying to access a post’s ID in a context where no valid 
   post object exists (for example, on your homepage when it’s set to display latest
   posts, on archive pages, or on 404 pages). It’s a missing safety check in the
   code that generates the social media (Open Graph) image tags.
 * **This isn’t related to Google Search Console**; it happens on every front-end
   page load where AIOSEO can’t find a valid post object to work with. You’d see
   it on any page visit, regardless of whether GSC is connected or not.
 * **How to fix this on your end right now**
 * This warning only triggers when the **Default Post Image Source** is set to “**
   First Available Image**” in your AIOSEO social settings. Changing it to a different
   option will stop the warning immediately.
 * Here’s what to do:
    1. Go to **All in One SEO > Social Networks > Facebook**.
    2. Find the **Default Post Image Source** dropdown.
    3. Change it from “First Available Image” to either:
    4.  - **“Default Image (Set Below)”** — then set a default image in the field below
          it. This is the recommended option since it gives you control over the image
          used when sharing your site on social media.
        - **“Featured Image”** — this will use each post’s featured image instead. 
          Just make sure your posts have a featured image set.
 * Here’s a screenshot showing where the setting is: [https://a.supportally.com/i/Mgr8cs ](https://a.supportally.com/i/Mgr8cs)
 * **How to hide the warning from visitors**
 * The reason this warning is showing up visibly on your site is because PHP error
   display is turned on in your server configuration. This is useful for development,
   but on a live site it exposes warnings like this to visitors. To hide it, you
   can add this line near the top of your `wp-config.php` file (before the line 
   that says `/* That's all, stop editing! */`):
 *     ```wp-block-code
       ini_set( 'display_errors', '0' );
       ```
   
 * Or if you have these lines in your `wp-config.php`, change them to:
 *     ```wp-block-code
       define( 'WP_DEBUG', false );
       ```
   
 * This won’t fix the underlying bug, but it’ll stop all PHP warnings from being
   visible on your site.
 * **On our end**
 * I was able to replicate the problem you described on my local site.
 * I’ve raised an internal issue with our Development team, and they’re actively
   investigating this further.
 * Thanks again for taking the time to report this, and sorry for the inconvenience!
 *  Thread Starter [Mordechaj](https://wordpress.org/support/users/mordechaj/)
 * (@mordechaj)
 * [4 weeks, 1 day ago](https://wordpress.org/support/topic/php-error-707/#post-18892481)
 * Thank you for your comprehensive answer, I followed the instructions and the 
   warning no longer appears.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-707%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mordechaj](https://wordpress.org/support/users/mordechaj/)
 * Last activity: [4 weeks, 1 day ago](https://wordpress.org/support/topic/php-error-707/#post-18892481)
 * Status: resolved