Skip to content

Commit

Permalink
Fixing compatibility in ConnectionManager with php4. Fixes #187
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 11, 2010
1 parent 4ada5b7 commit dda2414
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cake/libs/model/connection_manager.php
Expand Up @@ -141,7 +141,12 @@ function sourceList() {
*/
function getSourceName(&$source) {
$_this =& ConnectionManager::getInstance();
return array_search($source, $_this->_dataSources);
foreach ($_this->_dataSources as $name => $ds) {
if ($ds == $source) {
return $name;
}
}
return '';
}

/**
Expand Down

0 comments on commit dda2414

Please sign in to comment.