From fb70fa0f3641b440e0572c2c8f7c574aad06c9d8 Mon Sep 17 00:00:00 2001 From: Joey3000 <Joey3000@users.noreply.github.com> Date: Mon, 21 Sep 2015 03:47:31 +0200 Subject: [PATCH] Add error control operator prefix @ before ini_set() Added where where missing --- libs/Zend/Session.php | 4 ++-- libs/Zend/Validate/Hostname.php | 4 ++-- libs/Zend/Validate/StringLength.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php index bbf8c1cc94..b5177c18fd 100644 --- a/libs/Zend/Session.php +++ b/libs/Zend/Session.php @@ -202,7 +202,7 @@ class Zend_Session extends Zend_Session_Abstract if (!self::$_defaultOptionsSet) { foreach (self::$_defaultOptions as $defaultOptionName => $defaultOptionValue) { if (isset(self::$_defaultOptions[$defaultOptionName])) { - ini_set("session.$defaultOptionName", $defaultOptionValue); + @ini_set("session.$defaultOptionName", $defaultOptionValue); } } @@ -216,7 +216,7 @@ class Zend_Session extends Zend_Session_Abstract // set the ini based values if (array_key_exists($userOptionName, self::$_defaultOptions)) { - ini_set("session.$userOptionName", $userOptionValue); + @ini_set("session.$userOptionName", $userOptionValue); } elseif (isset(self::$_localOptions[$userOptionName])) { self::${self::$_localOptions[$userOptionName]} = $userOptionValue; diff --git a/libs/Zend/Validate/Hostname.php b/libs/Zend/Validate/Hostname.php index 3540743db0..e485a5d546 100644 --- a/libs/Zend/Validate/Hostname.php +++ b/libs/Zend/Validate/Hostname.php @@ -551,7 +551,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract if (PHP_VERSION_ID < 50600) { iconv_set_encoding('internal_encoding', 'UTF-8'); } else { - ini_set('default_charset', 'UTF-8'); + @ini_set('default_charset', 'UTF-8'); } do { @@ -652,7 +652,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract if (PHP_VERSION_ID < 50600) { iconv_set_encoding('internal_encoding', $origenc); } else { - ini_set('default_charset', $origenc); + @ini_set('default_charset', $origenc); } // If the input passes as an Internet domain name, and domain names are allowed, then the hostname diff --git a/libs/Zend/Validate/StringLength.php b/libs/Zend/Validate/StringLength.php index 364f665553..ca1946036e 100644 --- a/libs/Zend/Validate/StringLength.php +++ b/libs/Zend/Validate/StringLength.php @@ -205,7 +205,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract if (PHP_VERSION_ID < 50600) { $result = iconv_set_encoding('internal_encoding', $encoding); } else { - $result = ini_set('default_charset', $encoding); + $result = @ini_set('default_charset', $encoding); } if (!$result) { require_once 'Zend/Validate/Exception.php'; @@ -215,7 +215,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract if (PHP_VERSION_ID < 50600) { iconv_set_encoding('internal_encoding', $orig); } else { - ini_set('default_charset', $orig); + @ini_set('default_charset', $orig); } } -- GitLab