File tree Expand file tree Collapse file tree 6 files changed +20
-1
lines changed
Expand file tree Collapse file tree 6 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ public function collect()
7070 $ data = parent ::collect ();
7171 $ data ['nb_measures ' ] = count ($ data ['measures ' ]);
7272
73+ if (! $ data ['nb_measures ' ]) {
74+ return [];
75+ }
76+
7377 return $ data ;
7478 }
7579
Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ public function collect()
9999 $ data = parent ::collect ();
100100 $ data ['nb_measures ' ] = count ($ data ['measures ' ]);
101101
102+ if (! $ data ['nb_measures ' ]) {
103+ return [];
104+ }
105+
102106 return $ data ;
103107 }
104108
Original file line number Diff line number Diff line change @@ -584,6 +584,11 @@ public function collect()
584584 }
585585
586586 $ visibleStatements = count ($ statements ) - $ this ->infoStatements ;
587+
588+ if (! $ visibleStatements ) {
589+ return [];
590+ }
591+
587592 $ data = [
588593 'nb_statements ' => $ this ->queryCount ,
589594 'nb_visible_statements ' => $ visibleStatements ,
Original file line number Diff line number Diff line change @@ -201,6 +201,10 @@ public function collect()
201201 $ templates = $ this ->templates ;
202202 }
203203
204+ if (empty ($ this ->templates )) {
205+ return [];
206+ }
207+
204208 return [
205209 'nb_templates ' => count ($ this ->templates ),
206210 'templates ' => $ templates ,
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ protected function getEnvironmentSetUp($app)
2323
2424 $ app ['env ' ] = 'local ' ;
2525
26- // $app['config']->set('app.debug', true);
26+ //$app['config']->set('app.debug', true);
27+ $ app ['config ' ]->set ('debugbar.hide_empty_tabs ' , false );
2728
2829 /** @var Router $router */
2930 $ router = $ app ['router ' ];
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ protected function getEnvironmentSetUp($app)
4747 {
4848 /** @var Router $router */
4949 $ router = $ app ['router ' ];
50+ $ app ['config ' ]->set ('debugbar.hide_empty_tabs ' , false );
5051
5152 $ this ->addWebRoutes ($ router );
5253 $ this ->addApiRoutes ($ router );
You can’t perform that action at this time.
0 commit comments