From 33559103ddf02648837c85ed72425ac06c06080c Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 2 Feb 2009 18:50:38 +0000 Subject: replaced all sizeof() in favor of count() - aliases are teh sux0r --- system/libraries/Xmlrpc.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'system/libraries/Xmlrpc.php') diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index b077d3d1f..987f27469 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -133,7 +133,7 @@ class CI_Xmlrpc { function initialize($config = array()) { - if (sizeof($config) > 0) + if (count($config) > 0) { foreach ($config as $key => $val) { @@ -554,7 +554,7 @@ class XML_RPC_Response { reset($xmlrpc_val->me); list($a,$b) = each($xmlrpc_val->me); - $size = sizeof($b); + $size = count($b); $arr = array(); @@ -619,9 +619,9 @@ class XML_RPC_Message extends CI_Xmlrpc parent::CI_Xmlrpc(); $this->method_name = $method; - if (is_array($pars) && sizeof($pars) > 0) + if (is_array($pars) && count($pars) > 0) { - for($i=0; $iparams[] = $pars[$i]; @@ -639,7 +639,7 @@ class XML_RPC_Message extends CI_Xmlrpc $this->payload .= '' . $this->method_name . "\r\n"; $this->payload .= "\r\n"; - for($i=0; $iparams); $i++) + for($i=0; $iparams); $i++) { // $p = XML_RPC_Values $p = $this->params[$i]; @@ -737,7 +737,7 @@ class XML_RPC_Message extends CI_Xmlrpc // PARSE XML DATA //------------------------------------- - if ( ! xml_parse($parser, $data, sizeof($data))) + if ( ! xml_parse($parser, $data, count($data))) { $errstr = sprintf('XML error: %s at line %d', xml_error_string(xml_get_error_code($parser)), @@ -1137,7 +1137,7 @@ class XML_RPC_Message extends CI_Xmlrpc { $parameters = array(); - for ($i = 0; $i < sizeof($this->params); $i++) + for ($i = 0; $i < count($this->params); $i++) { $a_param = $this->decode_message($this->params[$i]); @@ -1171,7 +1171,7 @@ class XML_RPC_Message extends CI_Xmlrpc $arr = array(); - for($i = 0; $i < sizeof($b); $i++) + for($i = 0; $i < count($b); $i++) { $arr[] = $this->decode_message($param->me['array'][$i]); } @@ -1340,7 +1340,7 @@ class XML_RPC_Values extends CI_Xmlrpc case 2: // array $rs .= "\n\n"; - for($i=0; $i < sizeof($val); $i++) + for($i=0; $i < count($val); $i++) { $rs .= $this->serializeval($val[$i]); } -- cgit v1.2.3-24-g4f1b