Skip to content

Commit

Permalink
Merge pull request #14887 from cakephp/dereuromark-patch-1
Browse files Browse the repository at this point in the history
Fix null exception in getAlias() for special abstract table case for plugin models.
  • Loading branch information
markstory committed Aug 9, 2020
2 parents 17eae84 + 05426b8 commit 7254117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function getAlias(): string
if ($this->_alias === null) {
$alias = namespaceSplit(static::class);
$alias = substr(end($alias), 0, -5) ?: $this->_table;
$this->_alias = $alias;
$this->_alias = (string)$alias;
}

return $this->_alias;
Expand Down

0 comments on commit 7254117

Please sign in to comment.