Fixed Clockwork missing dumped arrays and objects

This commit is contained in:
Matias Griese
2020-12-23 20:21:55 +02:00
parent bc2435efe9
commit 79ee06f518
2 changed files with 11 additions and 9 deletions

View File

@@ -16,6 +16,7 @@
* Fixed pages with session messages should never be cached [#3108](https://github.com/getgrav/grav/issues/3108)
* Fixed `Filesystem::normalize()` with dot-dot paths
* Fixed Flex sorting issues [grav-plugin-flex-objects#92](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/92)
* Fixed Clockwork missing dumped arrays and objects
# v1.7.0-rc.20
## 12/15/2020

View File

@@ -743,18 +743,19 @@ class Debugger
}
if ($this->clockwork) {
$context = $isString;
if (!is_scalar($message)) {
$isString = $message;
$message = '';
$context = $message;
$message = gettype($context);
}
if (is_bool($isString)) {
$isString = [];
if (is_bool($context)) {
$context = [];
} elseif (!is_array($context)) {
$type = gettype($context);
$context = [$type => $context];
}
if (!is_array($isString)) {
$type = gettype($isString);
$isString = [$type => $isString];
}
$this->clockwork->log($label, $message, $isString);
$this->clockwork->log($label, $message, $context);
}
}