diff -r 5a6b6e770365 -r 68c69c656a2c web/lib/Zend/Service/Technorati.php --- a/web/lib/Zend/Service/Technorati.php Thu May 07 15:10:09 2015 +0200 +++ b/web/lib/Zend/Service/Technorati.php Thu May 07 15:16:02 2015 +0200 @@ -16,11 +16,13 @@ * @category Zend * @package Zend_Service * @subpackage Technorati - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Technorati.php 24593 2012-01-05 20:35:02Z matthew $ + * @version $Id$ */ +/** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** * Zend_Service_Technorati provides an easy, intuitive and object-oriented interface @@ -32,7 +34,7 @@ * @category Zend * @package Zend_Service * @subpackage Technorati - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Service_Technorati @@ -84,10 +86,15 @@ */ public function __construct($apiKey) { - iconv_set_encoding('output_encoding', 'UTF-8'); - iconv_set_encoding('input_encoding', 'UTF-8'); - iconv_set_encoding('internal_encoding', 'UTF-8'); - + if (PHP_VERSION_ID < 50600) { + iconv_set_encoding('output_encoding', 'UTF-8'); + iconv_set_encoding('input_encoding', 'UTF-8'); + iconv_set_encoding('internal_encoding', 'UTF-8'); + } else { + ini_set('output_encoding', 'UTF-8'); + ini_set('input_encoding', 'UTF-8'); + ini_set('default_charset', 'UTF-8'); + } $this->_apiKey = $apiKey; } @@ -961,7 +968,7 @@ protected function _convertResponseAndCheckContent(Zend_Http_Response $response) { $dom = new DOMDocument(); - $dom->loadXML($response->getBody()); + $dom = Zend_Xml_Security::scan($response->getBody(), $dom); self::_checkErrors($dom); return $dom; }