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

---

# php warning in new version

 *  Resolved [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [3 weeks, 4 days 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 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Bojan Katusic](https://wordpress.org/support/users/bojankatusic/)
 * (@bojankatusic)
 * [3 weeks, 3 days 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.
 *  Plugin Support [Bojan Katusic](https://wordpress.org/support/users/bojankatusic/)
 * (@bojankatusic)
 * [2 weeks, 2 days ago](https://wordpress.org/support/topic/php-warning-in-new-version-2/#post-18919646)
 * A fix for this issue was included in version v6.1 of MainWP Dashboard.
 * Thanks again for reporting this to us.

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-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/)

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