PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
function __construct($facebook=NULL,$isAjax=false) {
// initialize class
require_once (PATH_CORE.'/classes/db.class.php');
$this->db=new cloudDatabase();
require_once (PATH_CORE.'/classes/systemStatus.class.php');
$this->ssObj=new systemStatus($this->db);
$this->ssObj->getProperties(&$this);
if (!is_null($facebook))
$this->facebook=&$facebook; // must do before setupTemplates();
require_once (PATH_FACEBOOK.'/classes/session.class.php');
$this->session=new session($this);
$this->isAjax=$isAjax;
if (!$isAjax) {
$this->session->setupSession();
} else {
// to do - setup session via jscript rather than POST
}
}
58 - The behaviour of functions with by-reference parameters called by value has
59 changed. Where previously the function would accept the by-value argument, a
60 warning is now emitted and all by-ref parameters are set to NULL.
Basically, the function is defined as accepting a reference yet you are passing it by value. So, you will need to prefix it the variable with an ampersand to remove the deprecated warning.
The OP had designated line 6 as being line 24... I'm not really sure which solution is correct as I'm unable to evaluate it. However, the upgrade document specifically states it will throw a warning in the case that the user provides a by-value variable (ie: not prefixed with ampersand) when the function expects a variable reference.
Hopefully the OP will let us know which of these solutions managed to solve the issue.