Skip to content

Commit

Permalink
Removing instance by reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Nov 9, 2010
1 parent c983067 commit b413aa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/libs/debugger.php
Expand Up @@ -180,7 +180,7 @@ public static function &getInstance($class = null) {
static $instance = array();
if (!empty($class)) {
if (!$instance || strtolower($class) != strtolower(get_class($instance[0]))) {
$instance[0] = & new $class();
$instance[0] = new $class();
if (Configure::read('debug') > 0) {
Configure::version(); // Make sure the core config is loaded
$instance[0]->helpPath = Configure::read('Cake.Debugger.HelpPath');
Expand All @@ -189,7 +189,7 @@ public static function &getInstance($class = null) {
}

if (!$instance) {
$instance[0] =& new Debugger();
$instance[0] = new Debugger();
if (Configure::read('debug') > 0) {
Configure::version(); // Make sure the core config is loaded
$instance[0]->helpPath = Configure::read('Cake.Debugger.HelpPath');
Expand Down

0 comments on commit b413aa9

Please sign in to comment.