Commit a4809bca by Qiang Xue

Fixes #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is…

Fixes #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object
parent 1be66985
......@@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.0-rc under development
--------------------------
- Bug #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object (qiangxue)
- no changes in this release.
......
......@@ -70,8 +70,7 @@ class Widget extends Component implements ViewContextInterface
if (!empty(self::$stack)) {
$widget = array_pop(self::$stack);
if (get_class($widget) === get_called_class()) {
$widget->run();
echo $widget->run();
return $widget;
} else {
throw new InvalidCallException("Expecting end() of " . get_class($widget) . ", found " . get_called_class());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment