update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -199,14 +199,24 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract
|
|||
public function setEncoding($encoding = null)
|
||||
{
|
||||
if ($encoding !== null) {
|
||||
$orig = iconv_get_encoding('internal_encoding');
|
||||
$result = iconv_set_encoding('internal_encoding', $encoding);
|
||||
$orig = PHP_VERSION_ID < 50600
|
||||
? iconv_get_encoding('internal_encoding')
|
||||
: ini_get('default_charset');
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
$result = iconv_set_encoding('internal_encoding', $encoding);
|
||||
} else {
|
||||
$result = @ini_set('default_charset', $encoding);
|
||||
}
|
||||
if (!$result) {
|
||||
// require_once 'Zend/Validate/Exception.php';
|
||||
require_once 'Zend/Validate/Exception.php';
|
||||
throw new Zend_Validate_Exception('Given encoding not supported on this OS!');
|
||||
}
|
||||
|
||||
iconv_set_encoding('internal_encoding', $orig);
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
iconv_set_encoding('internal_encoding', $orig);
|
||||
} else {
|
||||
@ini_set('default_charset', $orig);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_encoding = $encoding;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue