Skip to content

Commit 266520a

Browse files
martyfjasonvarga
andauthored
[6.x] Fix debugbar helper binding (#13873)
Co-authored-by: Jason Varga <jason@pixelfear.com>
1 parent 16c474e commit 266520a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Forms/Tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ protected function parseJsParamDriverAndOptions($value, $form)
389389
*/
390390
protected function addToDebugBar($data, $formHandle)
391391
{
392-
if (! function_exists('debugbar') || ! class_exists(ConfigCollector::class)) {
392+
if (! function_exists('debugbar') || ! debugbar()->isEnabled() || ! class_exists(ConfigCollector::class)) {
393393
return;
394394
}
395395

src/helpers.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
use Barryvdh\Debugbar\LaravelDebugbar;
43
use Statamic\Facades\Path;
54
use Statamic\Statamic;
65

@@ -17,6 +16,6 @@ function statamic_path($path = null)
1716
if (! function_exists('debugbar')) {
1817
function debugbar()
1918
{
20-
return app()->bound(LaravelDebugbar::class) ? app(LaravelDebugbar::class) : optional();
19+
return app()->bound('debugbar') ? app('debugbar') : optional();
2120
}
2221
}

0 commit comments

Comments
 (0)