jenkins-bot has submitted this change and it was merged.

Change subject: Added wfSuppressWarnings and wfRestoreWarnings
......................................................................


Added wfSuppressWarnings and wfRestoreWarnings

Added wfSuppressWarnings and wfRestoreWarnings before and after the
ini_set call to apc cache by default to suppress errors if ini_set is
disabled.

Change-Id: If91e99c30fce3af14e69acd35112af188e62b6ac
---
M includes/cache/LocalisationCache.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/cache/LocalisationCache.php 
b/includes/cache/LocalisationCache.php
index cba2ba7..9047a47 100644
--- a/includes/cache/LocalisationCache.php
+++ b/includes/cache/LocalisationCache.php
@@ -510,9 +510,15 @@
        protected function readPHPFile( $_fileName, $_fileType ) {
                wfProfileIn( __METHOD__ );
                // Disable APC caching
+               wfSuppressWarnings();
                $_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
+               wfRestoreWarnings();
+
                include $_fileName;
+
+               wfSuppressWarnings();
                ini_set( 'apc.cache_by_default', $_apcEnabled );
+               wfRestoreWarnings();
 
                if ( $_fileType == 'core' || $_fileType == 'extension' ) {
                        $data = compact( self::$allKeys );

-- 
To view, visit https://gerrit.wikimedia.org/r/110693
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If91e99c30fce3af14e69acd35112af188e62b6ac
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Imjacobclark <jacob.jh.cl...@googlemail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Brian Wolff <bawolff...@gmail.com>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Martineznovo <martinezn...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to