Browse Source

Fix #3327: "Unable to find debug data" when logging objects with circular references

tags/2.0.0-rc
Alexander Makarov 11 years ago
parent
commit
4e5079abd8
  1. 1
      framework/CHANGELOG.md
  2. 3
      framework/log/Target.php

1
framework/CHANGELOG.md

@ -23,6 +23,7 @@ Yii Framework 2 Change Log
- Bug #3236: Return value for DateTime->format('U') casted to double to allow correct date formatting (pgaultier)
- Bug #3268: Fixed the bug that the schema name in a table name was not respected by `yii\db\mysql\Schema` (terazoid, qiangxue)
- Bug #3311: Fixed the bug that `yii\di\Container::has()` did not return correct value (mgrechanik, qiangxue)
- Bug #3327: Fixed "Unable to find debug data" when logging objects with circular references (jarekkozak, samdark)
- Enh #2264: `CookieCollection::has()` will return false for expired or removed cookies (qiangxue)
- Enh #2837: Error page now shows arguments in stack trace method calls (samdark)
- Enh #2906: Added support for using conditional comments for js and css files registered through asset bundles and Html helper (exromany, qiangxue)

3
framework/log/Target.php

@ -10,6 +10,7 @@ namespace yii\log;
use Yii;
use yii\base\Component;
use yii\base\InvalidConfigException;
use yii\helpers\VarDumper;
use yii\web\Request;
/**
@ -115,7 +116,7 @@ abstract class Target extends Component
$context = [];
foreach ($this->logVars as $name) {
if (!empty($GLOBALS[$name])) {
$context[] = "\${$name} = " . var_export($GLOBALS[$name], true);
$context[] = "\${$name} = " . VarDumper::dumpAsString($GLOBALS[$name]);
}
}

Loading…
Cancel
Save