Compare commits

...

4 Commits

Author SHA1 Message Date
Finlay Metcalfe
fedf2310d2
Merge 8b4865ed2c533d068b0f5b57395d007927e75cfe into a81b7855de814be8c3e4fb1c9341e2c507f34b6b 2024-09-25 00:32:35 +12:00
Guy Sartorelli
a81b7855de
Merge pull request #11393 from creative-commoners/pulls/5/fix-constructor
FIX Use correct contructor for HTTPOutputHandler
2024-09-24 09:35:35 +12:00
Steve Boyd
e93dafb2fe FIX Use correct contructor for HTTPOutputHandler 2024-09-19 17:21:12 +12:00
Finlay Metcalfe
8b4865ed2c
FIX Return null error solved for DBQueryBuilder::shouldBuildTraceComment 2024-05-16 14:04:13 +12:00
2 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@ namespace SilverStripe\Logging;
use Monolog\Formatter\FormatterInterface;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Level;
use Monolog\LogRecord;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
@ -34,9 +35,9 @@ class HTTPOutputHandler extends AbstractProcessingHandler
*/
private $cliFormatter = null;
public function __construct()
public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true)
{
parent::__construct();
parent::__construct($level, $bubble);
Deprecation::withSuppressedNotice(function () {
Deprecation::notice(
'5.4.0',

View File

@ -86,7 +86,7 @@ class DBQueryBuilder
if (Environment::hasEnv('SS_TRACE_DB_QUERY_ORIGIN')) {
return (bool) Environment::getEnv('SS_TRACE_DB_QUERY_ORIGIN');
}
return static::config()->get('trace_query_origin');
return static::config()->get('trace_query_origin') ?? false;
}
/**