mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Disabling Model::loadInfo() for models that do not use tables
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4426 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
381bd36c94
commit
75eea8950c
1 changed files with 3 additions and 1 deletions
|
@ -801,8 +801,10 @@ class Model extends Overloadable {
|
|||
function loadInfo() {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
|
||||
if (!is_object($this->_tableInfo) && $db->isInterfaceSupported('describe')) {
|
||||
if (!is_object($this->_tableInfo) && $db->isInterfaceSupported('describe') && $this->useTable !== false) {
|
||||
$this->_tableInfo = new Set($db->describe($this));
|
||||
} elseif ($this->useTable === false) {
|
||||
return new Set();
|
||||
}
|
||||
return $this->_tableInfo;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue