From 4e183bf49238c68c33ea2ef42aecb0929d4e7047 Mon Sep 17 00:00:00 2001 From: nate Date: Fri, 7 Jul 2006 15:29:55 +0000 Subject: [PATCH] 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 --- cake/libs/model/datasources/dbo_source.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 9609fd36b..094d8ac69 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -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); }