diff options
author | Andrey Andreev <narf@devilix.net> | 2014-01-15 10:08:47 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-01-15 10:08:47 +0100 |
commit | 3d215207ceff44193e3c1888b868fc3f691718c0 (patch) | |
tree | 8bc38e624f69780ca05d233f2cbee44aa881b760 /system/libraries/Xmlrpc.php | |
parent | e0d77551cf9a2af4425760acfc1c10de6796ecfc (diff) |
Fix incorrect checks for the fwrite() return value
! fwrite() could trigger false-positives as it is possible for it to return 0
instead of boolean FALSE. (issue #2822)
Also removed an unnecessary log level check that caused an extra space to be inserted
for the INFO level. (proposed in PR #2821)
Diffstat (limited to 'system/libraries/Xmlrpc.php')
-rw-r--r-- | system/libraries/Xmlrpc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 2fd12599e..1f93e6981 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -724,7 +724,7 @@ class XML_RPC_Client extends CI_Xmlrpc .'Content-Length: '.strlen($msg->payload).$r.$r .$msg->payload; - if ( ! fwrite($fp, $op, strlen($op))) + if (fwrite($fp, $op, strlen($op)) === FALSE) { error_log($this->xmlrpcstr['http_error']); return new XML_RPC_Response(0, $this->xmlrpcerr['http_error'], $this->xmlrpcstr['http_error']); |