php warning in new version
-
In modules/logs/classes/class-log-manager.php, this is causing a php warning in the frontend:
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:
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)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.