From cced9d13f994d9a97b83d00b87e9dc6429ab573d Mon Sep 17 00:00:00 2001 From: Jacob Clark Date: Sat, 1 Feb 2014 15:25:29 +0000 Subject: [PATCH] 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 --- includes/cache/LocalisationCache.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index cba2ba7932..9047a47c07 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -510,9 +510,15 @@ class LocalisationCache { 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 ); -- 2.20.1