Skip to content

Commit d40593f

Browse files
committed
other fixes
1 parent 5a143d6 commit d40593f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

QM_Collector_WPBP_Debug_Output.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function output() {
3535
*/
3636
public function admin_title( array $title ) {
3737
$data = $this->collector->get_data();
38-
if ( is_array( $data['log'] ) ) {
38+
if ( isset( $data['log'] ) ) {
3939
$title[] = $this->title . ' (' . count( $data['log'] ) . ')';
4040
}
4141
return $title;
@@ -52,8 +52,8 @@ public function admin_class( array $class ) {
5252
}
5353

5454
public function admin_menu( array $menu ) {
55-
if ( is_array( $data['log'] ) ) {
56-
$data = $this->collector->get_data();
55+
$data = $this->collector->get_data();
56+
if ( isset( $data['log'] ) ) {
5757
$menu[] = $this->menu( array(
5858
'id' => $this->id,
5959
'href' => '#qm-' . str_replace( '_', '-', $this->id),

debug.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function __construct( $title ) {
1919
if( class_exists('QM_Collectors') ) {
2020
require_once( 'QM_Collector_WPBP_Debug.php' );
2121
$this->title = $title;
22+
$this->output = array();
2223

2324
QM_Collectors::add( new QM_Collector_WPBP_Debug( $this->title, $this ) );
2425
}

0 commit comments

Comments
 (0)