diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cc7e4d..d7848bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 apidoc extension Change Log 3.0.9 under development ----------------------- +- Bug #338: Fix deprecation error `Using null as an array offset is deprecated, use an empty string instead` (mspirkov) - Enh #337: Log invalid tags (mspirkov) diff --git a/models/Context.php b/models/Context.php index 85efb7d..f59a6fc 100644 --- a/models/Context.php +++ b/models/Context.php @@ -108,12 +108,8 @@ public function updateReferences() { // update all subclass references foreach ($this->classes as $class) { - if ($class->parentClass === null) { - continue; - } - $className = $class->name; - while (isset($this->classes[$class->parentClass])) { + while ($class->parentClass !== null && isset($this->classes[$class->parentClass])) { $class = $this->classes[$class->parentClass]; $class->subclasses[] = $className; } diff --git a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html index 8bfa321..b665dd1 100644 --- a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html +++ b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html @@ -43,7 +43,10 @@ Cat Dog -yiiunit\apidoc\data\api\base
+yiiunit\apidoc\data\api\basediff --git a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__5.html b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__5.html new file mode 100644 index 0000000..ddc95eb --- /dev/null +++ b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__5.html @@ -0,0 +1,197 @@ + + + + + + + + + + + + +
| Inheritance | ++yiiunit\apidoc\data\api\base\Controller » +yiiunit\apidoc\data\api\base\Component + | +
|---|
Controller is the base class for classes containing controller logic.
+ +