Skip to content

Commit

Permalink
MDL-43482 Chat Lot of "Only variables should be passed by reference".
Browse files Browse the repository at this point in the history
  • Loading branch information
scara committed Dec 24, 2013
1 parent bbb291b commit 323f4ff
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions mod/chat/chatd.php
Expand Up @@ -206,7 +206,9 @@ function write_data($connection, $text) {
// if this is needed, as we have a nonblocking socket anyway.
// If trouble starts to creep up, we 'll restore this.
// $check_socket = array($connection);
// $socket_changed = socket_select($read = NULL, $check_socket, $except = NULL, 0, 0);
// $read = null;
// $except = null;
// $socket_changed = socket_select($read, $check_socket, $except, 0, 0);
// if($socket_changed > 0) {
//
// // ABOVE CODE GOES HERE
Expand Down Expand Up @@ -696,7 +698,9 @@ function dismiss_ufo($handle, $disconnect = true, $message = NULL) {

function conn_accept() {
$read_socket = array($this->listen_socket);
$changed = socket_select($read_socket, $write = NULL, $except = NULL, 0, 0);
$write = null;
$except = null;
$changed = socket_select($read_socket, $write, $except, 0, 0);

if(!$changed) {
return false;
Expand Down Expand Up @@ -726,7 +730,9 @@ function conn_activity_ufo (&$handles) {
return 0;
}

$retval = socket_select($monitor, $a = NULL, $b = NULL, NULL);
$a = null;
$b = null;
$retval = socket_select($monitor, $a, $b, null);
$handles = $monitor;

return $retval;
Expand Down Expand Up @@ -1008,7 +1014,9 @@ function cli_switch($switch, $param = NULL) {
if($DAEMON->conn_activity_ufo($active)) {
foreach($active as $handle) {
$read_socket = array($handle);
$changed = socket_select($read_socket, $write = NULL, $except = NULL, 0, 0);
$write = null;
$except = null;
$changed = socket_select($read_socket, $write, $except, 0, 0);

if($changed > 0) {
// Let's see what it has to say
Expand Down

0 comments on commit 323f4ff

Please sign in to comment.