Skip to content

Commit

Permalink
Fixes PHP 5.3 warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://phpfreechat.svn.sourceforge.net/svnroot/phpfreechat/trunk@1271 2772adf2-ac07-0410-9d30-e29d8120292e
  • Loading branch information
kerphi committed Apr 12, 2010
1 parent 2999c0a commit df13054
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions src/pfccommand.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ function &Factory($name)

if (!class_exists($cmd_classname)) { $tmp = NULL; return $tmp; }

$cmd =& new $cmd_classname;
$cmd->name = $cmd_name;
$firstproxy = new $cmd_classname;
$firstproxy->name = $cmd_name;

// instanciate the proxies chaine
$firstproxy =& $cmd;
$proxies = array();
for($i = count($c->proxies)-1; $i >= 0; $i--)
{
$proxy_name = $c->proxies[$i];
Expand All @@ -87,11 +87,11 @@ function &Factory($name)
return $firstproxy;

// instanciate the proxy
$proxy =& new $proxy_classname;
$proxy->name = $cmd_name;
$proxy->proxyname = $proxy_name;
$proxy->linkTo($firstproxy);
$firstproxy =& $proxy;
$proxies[$i] = new $proxy_classname;
$proxies[$i]->name = $cmd_name;
$proxies[$i]->proxyname = $proxy_name;
$proxies[$i]->linkTo($firstproxy);
$firstproxy =& $proxies[$i];
}

/*
Expand Down
4 changes: 2 additions & 2 deletions src/pfccontainer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* pfccontainer.class.php
*
* Copyright © 2006 Stephane Gully <stephane.gully@gmail.com>
* Copyright 2006 Stephane Gully <stephane.gully@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -54,7 +54,7 @@ function pfcContainer($type = 'File', $usememorycache = true)
// create the concrete container instance
require_once dirname(__FILE__)."/containers/".$type.".class.php";
$container_classname = "pfcContainer_".$type;
$this->_container =& new $container_classname();
$this->_container = new $container_classname();
}
function getDefaultConfig()
{
Expand Down
2 changes: 1 addition & 1 deletion src/pfcproxycommand.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function pfcProxyCommand()

function linkTo(&$cmd)
{
$this->next =& $cmd;
$this->next = $cmd;
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/phpfreechat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function &handleRequest($request)

if ($c->debug) ob_start(); // capture output

$xml_reponse =& new pfcResponse();
$xml_reponse = new pfcResponse();

// check the command
$cmdstr = "";
Expand Down Expand Up @@ -348,7 +348,7 @@ function &handleRequest($request)

function &loadStyles($theme = 'default', &$xml_reponse)
{
if ($xml_reponse == null) $xml_reponse =& new pfcResponse();
if ($xml_reponse == null) $xml_reponse = new pfcResponse();

$c =& pfcGlobalConfig::Instance();

Expand Down Expand Up @@ -398,7 +398,7 @@ function &loadStyles($theme = 'default', &$xml_reponse)

function &loadScripts($theme, &$xml_reponse)
{
if ($xml_reponse == null) $xml_reponse =& new pfcResponse();
if ($xml_reponse == null) $xml_reponse = new pfcResponse();

$c =& pfcGlobalConfig::Instance();

Expand Down Expand Up @@ -529,7 +529,7 @@ function &loadScripts($theme, &$xml_reponse)

function loadInterface($theme = 'default', &$xml_reponse)
{
if ($xml_reponse == null) $xml_reponse =& new pfcResponse();
if ($xml_reponse == null) $xml_reponse = new pfcResponse();

$c =& pfcGlobalConfig::Instance();

Expand Down Expand Up @@ -559,7 +559,7 @@ function loadInterface($theme = 'default', &$xml_reponse)

function &loadChat($theme = 'default')
{
$xml_reponse =& new pfcResponse();
$xml_reponse = new pfcResponse();

$this->loadInterface($theme,$xml_reponse);
$this->loadStyles($theme,$xml_reponse);
Expand Down

0 comments on commit df13054

Please sign in to comment.