Skip to content

Commit

Permalink
#79 - StackOverflow on admin page. Why? Because they have parameters …
Browse files Browse the repository at this point in the history
…that are logged if unknown. This log also creating a context, creating a infinite loop. We broke the loop by checking the presence of the context.
  • Loading branch information
gerardnico committed Feb 22, 2024
1 parent 98b79f4 commit a535cfe
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions ComboStrap/LogUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public static function log2FrontEnd($message, $level, $canonical = "support", bo
} else {
$allow = MSG_USERS_ONLY;
}
msg($htmlMsg, $dokuWikiLevel, '', '',$allow);
msg($htmlMsg, $dokuWikiLevel, '', '', $allow);
}
}
}
Expand All @@ -273,13 +273,16 @@ public static function log2BrowserConsole($message)
*/
private static function throwErrorIfTest($level, $message, \Exception $e = null)
{
$actualLevel = ExecutionContext::getActualOrCreateFromEnv()->getConfig()
->getLogExceptionLevel();
if (PluginUtility::isTest()
&& ($level >= $actualLevel)
&& self::$throwExceptionOnDevTest
) {
throw new LogException($message, $level, $e);
if (PluginUtility::isTest() && self::$throwExceptionOnDevTest) {
try {
$actualLevel = ExecutionContext::getExecutionContext()->getConfig()->getLogExceptionLevel();
} catch (ExceptionNotFound $e) {
// In context creation
return;
}
if ($level >= $actualLevel) {
throw new LogException($message, $level, $e);
}
}
}

Expand Down

0 comments on commit a535cfe

Please sign in to comment.