From e4d42b2355690c09550a478d5c4106390ddc91b0 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 30 Aug 2008 13:14:41 -0400 Subject: [PATCH] better check for ready state on connection darcs-hash:20080830171441-84dde-bb5373c4af2ae223d7b4b150f5a76404247a7570.gz --- extlib/XMPPHP/XMLStream.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extlib/XMPPHP/XMLStream.php b/extlib/XMPPHP/XMLStream.php index 62aa4de890..1190167681 100644 --- a/extlib/XMPPHP/XMLStream.php +++ b/extlib/XMPPHP/XMLStream.php @@ -619,9 +619,9 @@ class XMPPHP_XMLStream { public function readyToProcess() { $read = array($this->socket); - $write = null; - $except = null; + $write = array(); + $except = array(); $updated = @stream_select($read, $write, $except, 0); - return $updated !== false; + return (($updated !== false) && ($updated > 0)); } } -- 2.39.5