Browse Source

Add additional empty() for tablePrefix.

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

Fixes #2462
mark_story 14 years ago
parent
commit
aeda986745
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Model/Model.php

+ 1 - 1
lib/Cake/Model/Model.php

@@ -801,7 +801,7 @@ class Model extends Object {
 		}
 		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;