Skip to content

Commit 555f9be

Browse files
committed
update toolbar to v4.3
1 parent 141e818 commit 555f9be

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Debug/Toolbar.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use CodeIgniter\HTTP\DownloadResponse;
77
use CodeIgniter\HTTP\RequestInterface;
88
use CodeIgniter\HTTP\ResponseInterface;
9+
use CodeIgniter\I18n\Time;
910
use Config\Services;
1011
use Kint\Kint;
1112
use Michalsn\CodeIgniterHtmx\HTTP\IncomingRequest;
@@ -47,7 +48,7 @@ public function prepare(?RequestInterface $request = null, ?ResponseInterface $r
4748
helper('filesystem');
4849

4950
// Updated to microtime() so we can get history
50-
$time = sprintf('%.6f', microtime(true));
51+
$time = sprintf('%.6f', Time::now()->format('U.u'));
5152

5253
if (! is_dir(WRITEPATH . 'debugbar')) {
5354
mkdir(WRITEPATH . 'debugbar', 0777);
@@ -75,11 +76,11 @@ public function prepare(?RequestInterface $request = null, ?ResponseInterface $r
7576
$kintScript = ($kintScript === '0') ? '' : $kintScript;
7677

7778
$script = PHP_EOL
78-
. '<script type="text/javascript" ' . csp_script_nonce() . ' id="debugbar_loader" '
79+
. '<script ' . csp_script_nonce() . ' id="debugbar_loader" '
7980
. 'data-time="' . $time . '" '
8081
. 'src="' . site_url() . '?debugbar"></script>'
81-
. '<script type="text/javascript" ' . csp_script_nonce() . ' id="debugbar_dynamic_script"></script>'
82-
. '<style type="text/css" ' . csp_style_nonce() . ' id="debugbar_dynamic_style"></style>'
82+
. '<script ' . csp_script_nonce() . ' id="debugbar_dynamic_script"></script>'
83+
. '<style ' . csp_style_nonce() . ' id="debugbar_dynamic_style"></style>'
8384
. $kintScript
8485
. PHP_EOL;
8586

0 commit comments

Comments
 (0)