Permalink
Browse files

Add additional empty() for tablePrefix.

Fixes compatibility issues with plugins that worked correctly in
previous point releases.

Fixes #2462
  • Loading branch information...
1 parent dbea156 commit aeda986745da388975de01330cc55146c03a4721 @markstory markstory committed Jan 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Model.php
View
@@ -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;

0 comments on commit aeda986

Please sign in to comment.