From: Matteo Nastasi (mop) Date: Sun, 20 Mar 2011 17:36:20 +0000 (+0100) Subject: reference operator removed because class are passed by reference as default in php5 X-Git-Tag: 3.4.4~9 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=182eff6ad1aafbdcb765a4190a24a1c8f2f93f6b;p=brisk.git reference operator removed because class are passed by reference as default in php5 --- diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index e41c252..87185da 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -907,7 +907,7 @@ class User { log_only("INIT MAIN DATA"); // SHSPLIT FIXME: init_data for User class ?? - $user =& User::create($id, "", ""); + $user = User::create($id, "", ""); if (@shm_put_var($shm, $tok, $user) == FALSE) { log_only("PUT_VAR FALLITA ".strlen(serialize($user))); log_only(serialize($user)); @@ -932,7 +932,7 @@ class User { } - function save_data(&$user, $id) + function save_data($user, $id) { GLOBAL $sess; diff --git a/web/index.php b/web/index.php index 5fd269d..ee4e791 100644 --- a/web/index.php +++ b/web/index.php @@ -238,7 +238,7 @@ function main() $is_table = FALSE; $sem = Room::lock_data(); log_main("lock Room"); - $room = &Room::load_data(); + $room = Room::load_data(); $curtime = time(); /* Actions */ @@ -280,7 +280,7 @@ function main() $room->garbage_manager(TRUE); /* try login */ - if (($user = &$room->add_user(&$sess, &$idx, $name, $pass_private, $_SERVER['REMOTE_ADDR'])) != FALSE) { + if (($user = $room->add_user(&$sess, &$idx, $name, $pass_private, $_SERVER['REMOTE_ADDR'])) != FALSE) { $ACTION = "room"; if ($idx < 0) { $idx = -$idx - 1; @@ -307,10 +307,10 @@ function main() // setcookie ("sess", "", time() + 180); $room->standup_update(&$user); - if (Room::save_data(&$room) == FALSE) { - echo "ERRORE SALVATAGGIO\n"; - exit; - } + if (Room::save_data($room) == FALSE) { + echo "ERRORE SALVATAGGIO\n"; + exit; + } } else { /* Login Rendering */