diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index 9f56fbb6dc69b..270a53deae09a 100644 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -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 @@ -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; @@ -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; @@ -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