YorCreative / Laravel-Scrubber

A Laravel package to scrub sensitive information that breaks operational security policies from being leaked on accident or not by developers.
MIT License
140 stars 12 forks source link

Uncaught TypeError: YorCreative\Scrubber\Services\ScrubberService::autoSanitize(): Argument #1 ($jsonContent) must be of type string, Monolog\LogRecord given, called in /code/vendor/yorcreative/laravel-scrubber/src/Scrubber.php on line 48 and defined in /code/vendor/yorcreative/laravel-scrubber/src/Services/ScrubberService.php:35 #35

Closed lucaxue closed 1 year ago

lucaxue commented 1 year ago

The ScrubberTap class registers the processor for Monolog Handlers. However, as mentioned here, Monolog no longer passes array/string but instead a new LogRecord class. Hence the Scrubber::processMessage(..) interface no longer works as intended.

lucaxue commented 1 year ago

See also: https://github.com/Seldaek/monolog/blob/main/UPGRADE.md#300

yordadev commented 1 year ago

Thank you for reporting this. I will get a patch going here shortly.

yordadev commented 1 year ago

https://github.com/YorCreative/Laravel-Scrubber/pull/36

yordadev commented 1 year ago

🔆 👍🏼 Resolved in 2.6 release along with some other things.

Can compare and see changes here: