mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding missing reference operators to getInstance methods.
This commit is contained in:
parent
ba06b5b456
commit
af92276ba9
5 changed files with 9 additions and 9 deletions
|
@ -163,7 +163,7 @@ class Cache {
|
|||
* @return array Array of configured Cache config names.
|
||||
*/
|
||||
function configured() {
|
||||
$self = Cache::getInstance();
|
||||
$self =& Cache::getInstance();
|
||||
return array_keys($self->__config);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ class Cache {
|
|||
* @return boolen success of the removal, returns false when the config does not exist.
|
||||
*/
|
||||
function drop($name) {
|
||||
$self = Cache::getInstance();
|
||||
$self =& Cache::getInstance();
|
||||
if (!isset($self->__config[$name])) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -653,7 +653,7 @@ class Controller extends Object {
|
|||
|
||||
if ($this->persistModel === true) {
|
||||
$this->_persist($modelClass, true, $this->{$modelClass});
|
||||
$registry = ClassRegistry::getInstance();
|
||||
$registry =& ClassRegistry::getInstance();
|
||||
$this->_persist($modelClass . 'registry', true, $registry->__objects, 'registry');
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1843,7 +1843,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
*/
|
||||
function testAssets() {
|
||||
Router::reload();
|
||||
$Configure = Configure::getInstance();
|
||||
$Configure =& Configure::getInstance();
|
||||
$Configure->__objects = null;
|
||||
|
||||
App::build(array(
|
||||
|
|
|
@ -321,16 +321,16 @@ class DebuggerTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testGetInstance() {
|
||||
$result = Debugger::getInstance();
|
||||
$result =& Debugger::getInstance();
|
||||
$this->assertIsA($result, 'Debugger');
|
||||
|
||||
$result = Debugger::getInstance('DebuggerTestCaseDebugger');
|
||||
$result =& Debugger::getInstance('DebuggerTestCaseDebugger');
|
||||
$this->assertIsA($result, 'DebuggerTestCaseDebugger');
|
||||
|
||||
$result = Debugger::getInstance();
|
||||
$result =& Debugger::getInstance();
|
||||
$this->assertIsA($result, 'DebuggerTestCaseDebugger');
|
||||
|
||||
$result = Debugger::getInstance('Debugger');
|
||||
$result =& Debugger::getInstance('Debugger');
|
||||
$this->assertIsA($result, 'Debugger');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -588,7 +588,7 @@ class CodeCoverageManager {
|
|||
*/
|
||||
function __getExecutableLines($content) {
|
||||
if (is_array($content)) {
|
||||
$manager = CodeCoverageManager::getInstance();
|
||||
$manager =& CodeCoverageManager::getInstance();
|
||||
$result = array();
|
||||
foreach ($content as $file) {
|
||||
$result[$file] = $manager->__getExecutableLines(file_get_contents($file));
|
||||
|
|
Loading…
Reference in a new issue