diff --git a/src/Data/Log.php b/src/Data/Log.php index 5e9b5ac..397e484 100644 --- a/src/Data/Log.php +++ b/src/Data/Log.php @@ -30,9 +30,9 @@ final class Log implements LogDataInterface { * @var array */ private static $filters = [ - self::MESSAGE => FILTER_SANITIZE_STRING, + self::MESSAGE => FILTER_SANITIZE_FULL_SPECIAL_CHARS, self::LEVEL => FILTER_SANITIZE_NUMBER_INT, - self::CHANNEL => FILTER_SANITIZE_STRING, + self::CHANNEL => FILTER_SANITIZE_FULL_SPECIAL_CHARS, self::CONTEXT => [ 'filter' => FILTER_UNSAFE_RAW, 'flags' => FILTER_REQUIRE_ARRAY ], ]; diff --git a/src/Handler/HandlersRegistry.php b/src/Handler/HandlersRegistry.php index 561b4d2..378ab94 100644 --- a/src/Handler/HandlersRegistry.php +++ b/src/Handler/HandlersRegistry.php @@ -121,6 +121,7 @@ public function find( $name ) { /** * @return int */ + #[\ReturnTypeWillChange] public function count() { return count( $this->handlers ); diff --git a/src/HookListener/WpDieHandlerListener.php b/src/HookListener/WpDieHandlerListener.php index 8ee0cbb..75729f1 100644 --- a/src/HookListener/WpDieHandlerListener.php +++ b/src/HookListener/WpDieHandlerListener.php @@ -52,7 +52,7 @@ public function filter( array $args ) { return function ( $message, $title = '', $args = [] ) use ( $handler ) { - $msg = filter_var( $message, FILTER_SANITIZE_STRING ); + $msg = filter_var( $message, FILTER_SANITIZE_FULL_SPECIAL_CHARS ); $context = $args; $context[ 'title' ] = $title; diff --git a/src/Processor/ProcessorsRegistry.php b/src/Processor/ProcessorsRegistry.php index 0a19c15..5c2970a 100644 --- a/src/Processor/ProcessorsRegistry.php +++ b/src/Processor/ProcessorsRegistry.php @@ -90,6 +90,7 @@ public function find( $name ) { /** * @return int */ + #[\ReturnTypeWillChange] public function count() { return count( $this->processors );