From 3f3f135ed5b47fd87a59d31fb3d1a4c773dcc3b3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Sep 2012 16:39:28 +0300 Subject: Misc. style changes --- system/libraries/Xmlrpc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Xmlrpc.php') diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index cbb91c40a..a8aaa2088 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -1359,7 +1359,7 @@ class XML_RPC_Values extends CI_Xmlrpc if ($type === $this->xmlrpcBoolean) { - $val = (int) (strcasecmp($val,'true') === 0 OR $val === 1 OR ($val === TRUE && strcasecmp($val, 'false'))); + $val = (int) (strcasecmp($val, 'true') === 0 OR $val === 1 OR ($val === TRUE && strcasecmp($val, 'false'))); } if ($this->mytype === 2) -- cgit v1.2.3-24-g4f1b From 740480a7513e29e201f56c6481067108a2031509 Mon Sep 17 00:00:00 2001 From: Dimitar Date: Fri, 5 Oct 2012 13:24:59 +0300 Subject: Bug-fix in XML-RPC library $type and $typeof are passed as strings in this function, therefore I took the easy way and simplified the validation. I tested with different requests (strings, numbers ..), no other issues found. --- system/libraries/Xmlrpc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 system/libraries/Xmlrpc.php (limited to 'system/libraries/Xmlrpc.php') diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php old mode 100644 new mode 100755 index a8aaa2088..dc5d27f8c --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -1317,15 +1317,15 @@ class XML_RPC_Values extends CI_Xmlrpc { $type = $type === '' ? 'string' : $type; - if ($this->xmlrpcTypes[$type] === 1) + if ($this->xmlrpcTypes[$type] == 1) { $this->addScalar($val,$type); } - elseif ($this->xmlrpcTypes[$type] === 2) + elseif ($this->xmlrpcTypes[$type] == 2) { $this->addArray($val); } - elseif ($this->xmlrpcTypes[$type] === 3) + elseif ($this->xmlrpcTypes[$type] == 3) { $this->addStruct($val); } @@ -1351,7 +1351,7 @@ class XML_RPC_Values extends CI_Xmlrpc return 0; } - if ($typeof !== 1) + if ($typeof != 1) { echo 'XML_RPC_Values: not a scalar type (${typeof})
'; return 0; -- cgit v1.2.3-24-g4f1b