ZF-7623: Zend_Queue_Stomp_Client_Connection
Description
I have an old version of zend core/php that returns allways zero on a call to stream_select, so I think (not sure) if it is better to check if the return array is empty, it works on my zend core version (PHP 5.2.5, Zend Core v2.5.0 running on a debian 5.0.2) ? In the function canRead of Zend_Queue_Stomp_Client_Connection change the code from :
return stream_select(
$read,
$write,
$except,
$this->_options['timeout_sec'],
$this->_options['timeout_usec']
) == 1;
// see http://us.php.net/manual/en/…
}
to:
$ret = stream_select(
$read,
$write,
$except,
$this->_options['timeout_sec'],
$this->_options['timeout_usec']
);
return ! ( $ret === false || empty( $read ) );
// see http://us.php.net/manual/en/…
}
Comments
Posted by Daniel Lo (danlo) on 2009-08-23T11:51:28.000+0000
I'm thinking about this.
-daniel
Posted by Andres Adjimann (adji) on 2009-08-24T06:04:30.000+0000
better you can do something like: if ($ret==false) throw Exception(...) return !empty( $read )
Posted by Andres Adjimann (adji) on 2009-08-24T06:05:50.000+0000
sorry I forget an equal sign in $ret==false must be $ret===false
Posted by Rob Allen (rob) on 2012-11-20T20:53:02.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.