Permalink
Browse files

Fixing compatibility in ConnectionManager with php4. Fixes #187

  • Loading branch information...
1 parent 4ada5b7 commit dda2414b5bd2efbab99e355631a4c0545ee842bb @markstory markstory committed Jan 11, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 cake/libs/model/connection_manager.php
@@ -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 '';
}
/**

0 comments on commit dda2414

Please sign in to comment.