mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing [Only variable references should be returned by reference]
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4778 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
08526db3f4
commit
1c6c32981e
2 changed files with 25 additions and 24 deletions
|
@ -198,7 +198,8 @@ class ConnectionManager extends Object {
|
|||
$_this =& ConnectionManager::getInstance();
|
||||
|
||||
if (empty($name) || empty($config) || array_key_exists($name, $_this->_connectionsEnum)) {
|
||||
return null;
|
||||
$null = null;
|
||||
return $null;
|
||||
}
|
||||
|
||||
$_this->config->{$name} = $config;
|
||||
|
|
|
@ -595,35 +595,35 @@ class DboSourceTest extends UnitTestCase {
|
|||
$result = $this->db->generateSelfAssociationQuery($this->model, $params['linkModel'], $params['type'], $params['assoc'], $params['assocData'], $queryData, $params['external'], $resultSet);
|
||||
$this->assertTrue($result);
|
||||
|
||||
$expected = array (array (
|
||||
'fields' => array (
|
||||
'`TestModel4`.`id`',
|
||||
'`TestModel4`.`name`',
|
||||
'`TestModel4`.`created`',
|
||||
'`TestModel4`.`updated`',
|
||||
'`TestModel4Parent`.`id`',
|
||||
'`TestModel4Parent`.`name`',
|
||||
'`TestModel4Parent`.`created`',
|
||||
$expected = array (array (
|
||||
'fields' => array (
|
||||
'`TestModel4`.`id`',
|
||||
'`TestModel4`.`name`',
|
||||
'`TestModel4`.`created`',
|
||||
'`TestModel4`.`updated`',
|
||||
'`TestModel4Parent`.`id`',
|
||||
'`TestModel4Parent`.`name`',
|
||||
'`TestModel4Parent`.`created`',
|
||||
'`TestModel4Parent`.`updated`'
|
||||
),
|
||||
'joins' => array (
|
||||
array (
|
||||
'table' => '`test_model4`',
|
||||
'alias' => 'TestModel4Parent',
|
||||
'type' => 'LEFT',
|
||||
'conditions' => array (
|
||||
),
|
||||
'joins' => array (
|
||||
array (
|
||||
'table' => '`test_model4`',
|
||||
'alias' => 'TestModel4Parent',
|
||||
'type' => 'LEFT',
|
||||
'conditions' => array (
|
||||
'`TestModel4`.`parent_id`' => '{$__cakeIdentifier[TestModel4Parent.id]__$}'
|
||||
)
|
||||
)
|
||||
),
|
||||
'table' => '`test_model4`',
|
||||
'alias' => 'TestModel4',
|
||||
'limit' => array ( ),
|
||||
'offset' => array ( ),
|
||||
'conditions' => array ( ),
|
||||
),
|
||||
'table' => '`test_model4`',
|
||||
'alias' => 'TestModel4',
|
||||
'limit' => array ( ),
|
||||
'offset' => array ( ),
|
||||
'conditions' => array ( ),
|
||||
'order' => array ( )
|
||||
));
|
||||
|
||||
|
||||
$this->assertEqual($queryData['selfJoin'], $expected);
|
||||
|
||||
$result = $this->db->generateAssociationQuery($this->model, $null, null, null, null, $queryData, false, $null);
|
||||
|
|
Loading…
Reference in a new issue