Title: PHP 8.x Warnings Admin
Last modified: August 12, 2025

---

# PHP 8.x Warnings Admin

 *  Resolved [annaam](https://wordpress.org/support/users/annaam/)
 * (@annaam)
 * [10 months ago](https://wordpress.org/support/topic/php-8-x-warnings-admin/)
 * Hi,
 * On PHP 8.x, I’m getting these warnings when visiting admin pages that don’t have
   a $post object (e.g., WCK Post Type Creator, Taxonomy Creator, etc.):
 * > [12-Aug-2025 15:08:13 UTC] PHP Warning: Attempt to read property “post_type”
   > on null in /sites/website/files/wp-content/plugins/custom-permalinks/includes/
   > class-custom-permalinks-form.php on line 91
   > [12-Aug-2025 15:08:13 UTC] PHP Warning: Attempt to read property “post_type”
   > on null in /sites/website/files/wp-content/plugins/custom-permalinks/includes/
   > class-custom-permalinks-form.php on line 123
   > [12-Aug-2025 15:08:13 UTC] PHP Warning: Attempt to read property “ID” on null
   > in /sites/website/files/wp-content/plugins/custom-permalinks/includes/class-
   > custom-permalinks-form.php on line 125
   > [12-Aug-2025 15:08:13 UTC] PHP Warning: Attempt to read property “post_type”
   > on null in /sites/website/files/wp-content/plugins/custom-permalinks/includes/
   > class-custom-permalinks-form.php on line 127
 * Seems like the global $post is assumed to always be a WP_Post, but on non-post
   admin screens, it’s null. Simply guarding it would fix these warnings.
 * Could you include this fix in the next release please?
 * Best,

Viewing 1 replies (of 1 total)

 *  Plugin Author [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/php-8-x-warnings-admin/#post-18647921)
 * [@annaam](https://wordpress.org/support/users/annaam/) Thank you for reporting
   the issue. Issue fixed and will be available in the upcoming version (`v3.1.1`).

Viewing 1 replies (of 1 total)

The topic ‘PHP 8.x Warnings Admin’ is closed to new replies.

 * ![](https://ps.w.org/custom-permalinks/assets/icon.svg?rev=1785367)
 * [Custom Permalinks](https://wordpress.org/plugins/custom-permalinks/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-permalinks/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-permalinks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-permalinks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-permalinks/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * Last activity: [8 months, 3 weeks ago](https://wordpress.org/support/topic/php-8-x-warnings-admin/#post-18647921)
 * Status: resolved