Title: PHP Warnings
Last modified: March 18, 2025

---

# PHP Warnings

 *  [mhgx](https://wordpress.org/support/users/mhgx/)
 * (@mhgx)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/php-warnings-201/)
 * Looks like this issue is ignored by developers.
   [https://wordpress.org/support/topic/errors-filling-my-log-file/](https://wordpress.org/support/topic/errors-filling-my-log-file/)
   Still generating `PHP Warning: Attempt to read property “ID” on null` lines in
   php logs. This is easy to fix. In file **inc/functions/glg-functions.php**, you
   can for example do something like this:
 *     ```wp-block-code
       function glg_post_page_hook( $content ){    global $post;    if ( trim( get_option( 'glg_gallery_active' ) ) != 'off' ) {
       ```
   
 * to:
 *     ```wp-block-code
       function glg_post_page_hook( $content ){    global $post;    if ( $post !== null && trim( get_option( 'glg_gallery_active' ) ) != 'off' ) {
       ```
   
 * Please fix this.

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

 * ![](https://ps.w.org/gallery-lightbox-slider/assets/icon-256x256.png?rev=1225809)
 * [Gallery Lightbox](https://wordpress.org/plugins/gallery-lightbox-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gallery-lightbox-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gallery-lightbox-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/gallery-lightbox-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gallery-lightbox-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gallery-lightbox-slider/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [mhgx](https://wordpress.org/support/users/mhgx/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/php-warnings-201/)
 * Status: not resolved