Permalink
Browse files

Fixing return by reference error on the use of ConnectionManager::get…

…DataSource() on a non-existing datasource.
  • Loading branch information...
1 parent 0c0e5d1 commit 11365e7a094a253fc4460848cc74c9801ef21c9e @jperras jperras committed Sep 24, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 cake/libs/model/connection_manager.php
@@ -114,7 +114,8 @@ function &getDataSource($name) {
$_this->_dataSources[$name]->configKeyName = $name;
} else {
trigger_error(sprintf(__("ConnectionManager::getDataSource - Non-existent data source %s", true), $name), E_USER_ERROR);
- return null;
+ $null = null;
+ return $null;
}
$return =& $_this->_dataSources[$name];

0 comments on commit 11365e7

Please sign in to comment.