From 27286b125b90c388e11d3557c19b82783dc3e4c3 Mon Sep 17 00:00:00 2001 From: Grzegorz Rola <grola@seostudio.pl> Date: Tue, 13 Aug 2024 12:15:23 +0200 Subject: [PATCH] bugfix(compatibility): backward compatibility --- CHANGELOG.md | 4 ++++ src/SimpleLoggerFactory.php | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0a14f6..50e3e70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.13.2] - 2024-08-13 +### Fixed +- backward compatibility, when second parameter in `SimpleLoggerFactory` constructor is null + ## [1.13.1] - 2024-08-13 ### Fixed - removed redundant semicolon in `SimpleLoggerFactory` class diff --git a/src/SimpleLoggerFactory.php b/src/SimpleLoggerFactory.php index 61267ed..eeb7e3a 100644 --- a/src/SimpleLoggerFactory.php +++ b/src/SimpleLoggerFactory.php @@ -35,6 +35,7 @@ final class SimpleLoggerFactory implements LoggerFactory { */ public function __construct( string $channel, $options = null ) { $this->channel = $channel; + $options = $options ?? new Settings(); if ( $options instanceof Settings ) { $options = $options->to_array(); -- GitLab