Skip to content

Commit

Permalink
Add additional empty() for tablePrefix.
Browse files Browse the repository at this point in the history
Fixes compatibility issues with plugins that worked correctly in
previous point releases.

Fixes #2462
  • Loading branch information
markstory committed Jan 11, 2012
1 parent dbea156 commit aeda986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Model.php
Expand Up @@ -801,7 +801,7 @@ public function __get($name) {
}
if ($name === 'tablePrefix') {
$this->setDataSource();
if (property_exists($this, 'tablePrefix')) {
if (property_exists($this, 'tablePrefix') && !empty($this->tablePrefix)) {
return $this->tablePrefix;
}
return $this->tablePrefix = null;
Expand Down

0 comments on commit aeda986

Please sign in to comment.