Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2.4.2 broken debugging #509

Open
dio5 opened this issue Apr 19, 2022 · 1 comment
Open

Magento 2.4.2 broken debugging #509

dio5 opened this issue Apr 19, 2022 · 1 comment

Comments

@dio5
Copy link

dio5 commented Apr 19, 2022

With debugging enabled, I'm getting the error:

TypeError: Argument 2 passed to Monolog\Logger::debug() must be of the type array, string given

Coming from:

$this->logger->additional('authorization header: ' . $key, 'auth');

which calls

$this->logger->debug('Checkout Logging: ', $msg);

in \CheckoutCom\Magento2\Helper\Logger::write

as Monolog\Logger::debug is expecting an array as second argument.

It seems it might just need to be concatenated instead?

    * @param  string $message The log message
     * @param  array  $context The log context
     * @return bool   Whether the record has been processed
     */
    public function debug($message, array $context = array())

(Also slight note on Magento 2.4.4 is using different version than 2.4.3 of Monolog.)

@dio5
Copy link
Author

dio5 commented Apr 19, 2022

Although I also notice sometimes arrays are passed to \CheckoutCom\Magento2\Helper\Logger::additional so will need better fixing than concat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant