Browse files

Merge branch 'm24_MDL-43482_Lot_Of_Passed_By_Reference_Messages' of h…

…ttps://github.com/scara/moodle into MOODLE_24_STABLE
  • Loading branch information...
2 parents 076792a + adf8e5c commit cf51a722c7597b8083584bb423f863301b367d59 @danpoltawski danpoltawski committed Jan 7, 2014
Showing with 12 additions and 4 deletions.
  1. +12 −4 mod/chat/chatd.php
View
16 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
@@ -691,7 +693,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;
@@ -721,7 +725,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;
@@ -1004,7 +1010,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

0 comments on commit cf51a72

Please sign in to comment.