diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-24 11:16:48 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-24 11:16:48 +0100 |
commit | 20e802eea2fc455622a0f4f721cb82acb046f5b8 (patch) | |
tree | 692ec54c53cd82b219bed07d4e3a1119551d10c6 | |
parent | c26b9ebb00e29be2e972fece3bcf73d33249a64b (diff) |
Really don't use globals
-rw-r--r-- | system/helpers/typography_helper.php | 3 | ||||
-rw-r--r-- | system/libraries/Xmlrpcs.php | 22 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
3 files changed, 14 insertions, 12 deletions
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index cd3827c8b..f08e78be6 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -88,8 +88,7 @@ if ( ! function_exists('entity_decode')) */ function entity_decode($str, $charset = NULL) { - global $SEC; - return $SEC->entity_decode($str, $charset); + return get_instance()->security->entity_decode($str, $charset); } } diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index e8e06d756..bed18ebae 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -203,15 +203,17 @@ class CI_Xmlrpcs extends CI_Xmlrpc { */ public function parseRequest($data = '') { - global $HTTP_RAW_POST_DATA; - //------------------------------------- // Get Data //------------------------------------- if ($data === '') { - $data = $HTTP_RAW_POST_DATA; + $CI =& get_instance(); + if ($CI->input->method() === 'post') + { + $data = http_build_query($CI->input->input_stream(NULL, FALSE)); + } } //------------------------------------- @@ -222,13 +224,13 @@ class CI_Xmlrpcs extends CI_Xmlrpc { $parser_object = new XML_RPC_Message('filler'); $parser_object->xh[$parser] = array( - 'isf' => 0, - 'isf_reason' => '', - 'params' => array(), - 'stack' => array(), - 'valuestack' => array(), - 'method' => '' - ); + 'isf' => 0, + 'isf_reason' => '', + 'params' => array(), + 'stack' => array(), + 'valuestack' => array(), + 'method' => '' + ); xml_set_object($parser, $parser_object); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, TRUE); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 07ea85bcf..aa20d626f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -726,6 +726,7 @@ Bug fixes for 3.0 - Fixed a bug where :doc:`HTML Table Library <libraries/table>` ignored its *auto_heading* setting if headings were not already set. - Fixed a bug (#2364) - :doc:`Pagination Library <libraries/pagination>` appended the query string (if used) multiple times when there are successive calls to ``create_links()`` with no ``initialize()`` in between them. - Partially fixed a bug (#261) - UTF-8 class method ``clean_string()`` generating log messages and/or not producing the desired result due to an upstream bug in iconv. +- Fixed a bug where ``CI_Xmlrpcs::parseRequest()`` could fail if ``$HTTP_RAW_POST_DATA`` is not populated. Version 2.1.4 ============= |