aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_jabber.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_jabber.php')
-rw-r--r--phpBB/includes/functions_jabber.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index c9ec6fea61..cf0865e608 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -103,8 +103,7 @@ class jabber
*/
static public function can_use_ssl()
{
- // Will not work with PHP >= 5.2.1 or < 5.2.3RC2 until timeout problem with ssl hasn't been fixed (http://bugs.php.net/41236)
- return ((version_compare(PHP_VERSION, '5.2.1', '<') || version_compare(PHP_VERSION, '5.2.3RC2', '>=')) && @extension_loaded('openssl')) ? true : false;
+ return @extension_loaded('openssl');
}
/**
@@ -208,7 +207,7 @@ class jabber
*/
function login()
{
- if (!sizeof($this->features))
+ if (!count($this->features))
{
$this->add_to_log('Error: No feature information from server available.');
return false;
@@ -294,7 +293,7 @@ class jabber
*/
function get_log()
{
- if ($this->enable_logging && sizeof($this->log_array))
+ if ($this->enable_logging && count($this->log_array))
{
return implode("<br /><br />", $this->log_array);
}
@@ -401,14 +400,14 @@ class jabber
*/
function response($xml)
{
- if (!is_array($xml) || !sizeof($xml))
+ if (!is_array($xml) || !count($xml))
{
return false;
}
// did we get multiple elements? do one after another
// array('message' => ..., 'presence' => ...)
- if (sizeof($xml) > 1)
+ if (count($xml) > 1)
{
foreach ($xml as $key => $value)
{
@@ -420,7 +419,7 @@ class jabber
{
// or even multiple elements of the same type?
// array('message' => array(0 => ..., 1 => ...))
- if (sizeof(reset($xml)) > 1)
+ if (count(reset($xml)) > 1)
{
foreach (reset($xml) as $value)
{
@@ -859,14 +858,14 @@ class jabber
array_push($children, $vals[$i]['value']);
}
- while (++$i < sizeof($vals))
+ while (++$i < count($vals))
{
switch ($vals[$i]['type'])
{
case 'open':
$tagname = (isset($vals[$i]['tag'])) ? $vals[$i]['tag'] : '';
- $size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;
+ $size = (isset($children[$tagname])) ? count($children[$tagname]) : 0;
if (isset($vals[$i]['attributes']))
{
@@ -884,7 +883,7 @@ class jabber
case 'complete':
$tagname = $vals[$i]['tag'];
- $size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;
+ $size = (isset($children[$tagname])) ? count($children[$tagname]) : 0;
$children[$tagname][$size]['#'] = (isset($vals[$i]['value'])) ? $vals[$i]['value'] : array();
if (isset($vals[$i]['attributes']))