Title: php warning in new version
Last modified: May 17, 2026

---

# php warning in new version

 *  [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [6 days, 9 hours ago](https://wordpress.org/support/topic/php-warning-in-new-version-2/)
 * In modules/logs/classes/class-log-manager.php, this is causing a php warning 
   in the frontend:
 *     ```wp-block-code
                   if ( ! empty( $this->settings->options['enabled'] ) ) {                add_action( 'mainwp_module_log_render_db_size_notice', array( $this->admin, 'render_logs_db_notice' ), 10, 1 );            }            add_action( 'mainwp_module_log_render_db_update_notice', array( $this->admin, 'render_update_db_notice' ), 10, 1 );
       ```
   
 * because $this->admin is not defined in the frontend (causing dynamic images not
   to be generated due to php warnings). Wrapping this in a is_null check works:
 *     ```wp-block-code
               if (!is_null(($this->admin))) {            if ( ! empty( $this->settings->options['enabled'] ) ) {                add_action( 'mainwp_module_log_render_db_size_notice', array( $this->admin, 'render_logs_db_notice' ), 10, 1 );            }            add_action( 'mainwp_module_log_render_db_update_notice', array( $this->admin, 'render_update_db_notice' ), 10, 1 );        }
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Support [Bojan Katusic](https://wordpress.org/support/users/bojankatusic/)
 * (@bojankatusic)
 * [5 days, 10 hours ago](https://wordpress.org/support/topic/php-warning-in-new-version-2/#post-18911216)
 * Hey [@liedekef](https://wordpress.org/support/users/liedekef/)
 * Thanks for reporting this to us.
 * We will have it fixed in an upcoming release.

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/mainwp/assets/icon-256x256.png?rev=2734946)
 * [MainWP Dashboard: Self-hosted WordPress Management for Agencies](https://wordpress.org/plugins/mainwp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mainwp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mainwp/)
 * [Active Topics](https://wordpress.org/support/plugin/mainwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mainwp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mainwp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bojan Katusic](https://wordpress.org/support/users/bojankatusic/)
 * Last activity: [5 days, 10 hours ago](https://wordpress.org/support/topic/php-warning-in-new-version-2/#post-18911216)
 * Status: not resolved