log icon indicating copy to clipboard operation
log copied to clipboard

Warning: Array to string conversion in vendor\yiisoft\log\src\Message.php on line 116

Open ghost opened this issue 2 years ago • 4 comments

##Warning: Array to string conversion in vendor\yiisoft\log\src\Message.php on line 116 $context[$placeholderName]

Need handler for different types. I use logger for doctrine.

Additional info

Q A
Version 2.0.0
PHP version 8.1.9
Operating system Linux and Windows

ghost avatar Feb 02 '23 19:02 ghost

@fcnybok can you show dump of $context?

vjik avatar Feb 03 '23 06:02 vjik

Thanks for posting in our issue tracker. In order to properly assist you, we need additional information:

  • When does the issue occur?
  • What do you see?
  • What was the expected result?
  • Can you supply us with a stacktrace? (optional)
  • Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)

Thanks!

This is an automated comment, triggered by adding the label status:need more info.

yii-bot avatar Feb 03 '23 07:02 yii-bot

@fcnybok can you show dump of $context?

2023-02-02 09:39:13.813900 [info][application] Connecting with parameters Array

Message context:

params: [ 'driver' => 'pdo_pgsql' 'dbname' => 'manager' 'host' => 'localhost' 'password' => '' 'user' => 'postgres' ] time: 1675330753.813901 memory: 18410928 category: 'application'

ghost avatar Feb 03 '23 08:02 ghost

  1. We can add support nested arrays, for example "{foo.bar}" will be use $context['foo']['bar'] value.
  2. Need correctly process non-string values without throw error / exception / warning.

vjik avatar Feb 03 '23 11:02 vjik