Title: PHP Warning in error_log for link-template.php
Last modified: February 11, 2024

---

# PHP Warning in error_log for link-template.php

 *  [Alexander S. Kunz](https://wordpress.org/support/users/antermoia/)
 * (@antermoia)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-in-error_log-for-link-template-php/)
 * Hello,
 * I’m using WordPress 6.4.3 and after updating to PHP v8.2 (maybe that’s the cause?)
   I’m seeing multiple entries in my error_log every day, with the following two
   lines repeating:
 *     ```wp-block-code
       [10-Feb-2024 12:57:52 UTC] PHP Warning:  Attempt to read property "post_type" on null in /home/xxx/public_html/alexkunz/wp-includes/link-template.php on line 4155
       [10-Feb-2024 12:57:52 UTC] PHP Warning:  Attempt to read property "post_type" on null in /home/xxx/public_html/alexkunz/wp-includes/link-template.php on line 4157
       ```
   
 * According to [https://wordpress.org/news/2023/10/wordpress-6-4s-php-compatibility/](https://wordpress.org/news/2023/10/wordpress-6-4s-php-compatibility/)
   PHP v8.2 should be good to go for WP 6.4 though, so I’m not sure why I’m seeing
   this error.
 * Is there anything I can do on my end to troubleshoot this?
 * Thanks
 * Alex.

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

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-in-error_log-for-link-template-php/#post-17415649)
 * WordPress 6.4 might be good with PHP 8.2, but that doesn’t mean your plugins 
   or theme are.
 * Please attempt to deactivate all plugins and switch to the default Twenty Twenty-
   Four theme. If the problem goes away, re-activate them one by one to identify
   the source of the problem.
 *  Thread Starter [Alexander S. Kunz](https://wordpress.org/support/users/antermoia/)
 * (@antermoia)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-in-error_log-for-link-template-php/#post-17415670)
 * I don’t see a way to jump to those high hoops with my live website.
 * What I find interesting is that the warning isn’t thrown for any plugin, but 
   rather, for WP’s own link_template.php from the /wp-includes directory.
 * I don’t know much of the inner workings of WordPress, but how would this be caused
   by the theme or plugin then?
 * Alex.
 *  [Alor UX](https://wordpress.org/support/users/jerrymayalor555/)
 * (@jerrymayalor555)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-in-error_log-for-link-template-php/#post-17415704)
 * Hi [@antermoia](https://wordpress.org/support/users/antermoia/),
 * There has been a PHP version conflict with some of the plugins on your website.
   Try to downgrade your PHP version one version at a time and check your website
   to see if the issue is gone.
 * If the issue persists, maybe you need to contact your hosting provider to better
   help you resolve the issue on your website.
 * Best regards,

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

The topic ‘PHP Warning in error_log for link-template.php’ is closed to new replies.

## Tags

 * [error_log](https://wordpress.org/support/topic-tag/error_log/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Alor UX](https://wordpress.org/support/users/jerrymayalor555/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-in-error_log-for-link-template-php/#post-17415704)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
