Skip to content

Commit

Permalink
other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Aug 10, 2018
1 parent 5a143d6 commit d40593f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions QM_Collector_WPBP_Debug_Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function output() {
*/
public function admin_title( array $title ) {
$data = $this->collector->get_data();
if ( is_array( $data['log'] ) ) {
if ( isset( $data['log'] ) ) {
$title[] = $this->title . ' (' . count( $data['log'] ) . ')';
}
return $title;
Expand All @@ -52,8 +52,8 @@ public function admin_class( array $class ) {
}

public function admin_menu( array $menu ) {
if ( is_array( $data['log'] ) ) {
$data = $this->collector->get_data();
$data = $this->collector->get_data();
if ( isset( $data['log'] ) ) {
$menu[] = $this->menu( array(
'id' => $this->id,
'href' => '#qm-' . str_replace( '_', '-', $this->id),
Expand Down
1 change: 1 addition & 0 deletions debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function __construct( $title ) {
if( class_exists('QM_Collectors') ) {
require_once( 'QM_Collector_WPBP_Debug.php' );
$this->title = $title;
$this->output = array();

QM_Collectors::add( new QM_Collector_WPBP_Debug( $this->title, $this ) );
}
Expand Down

0 comments on commit d40593f

Please sign in to comment.