mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing notices generated by new HABTM features
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3213 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
af18379343
commit
4e183bf492
1 changed files with 2 additions and 2 deletions
|
@ -1033,7 +1033,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
$joinFields = array();
|
||||
if (isset($assocData['with'])) {
|
||||
if (isset($assocData['with']) && !empty($assocData['with'])) {
|
||||
$joinName = array_keys($assocData['with']);
|
||||
$joinFields = $assocData['with'][$joinName[0]];
|
||||
|
||||
|
@ -1049,7 +1049,7 @@ class DboSource extends DataSource {
|
|||
$sql .= ' JOIN ' . $joinTbl;
|
||||
|
||||
$joinAssoc = $joinTbl;
|
||||
if (isset($assocData['with'])) {
|
||||
if (isset($assocData['with']) && !empty($assocData['with'])) {
|
||||
$joinAssoc = $joinName[0];
|
||||
$sql .= $this->alias . $this->name($joinAssoc);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue