From: Jacob Clark Date: Sat, 1 Feb 2014 15:25:29 +0000 (+0000) Subject: Added wfSuppressWarnings and wfRestoreWarnings X-Git-Tag: 1.31.0-rc.0~17045^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/message.php?a=commitdiff_plain;h=cced9d13f994d9a97b83d00b87e9dc6429ab573d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 );