From: Timo Tijhof Date: Mon, 2 Nov 2015 21:45:43 +0000 (+0000) Subject: Remove getLocalServerInstance try/catch in UIDGenerator and DBLockManager X-Git-Tag: 1.31.0-rc.0~9143 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=8a821011cee395a1dcc4b1164d3d45a38b0a3f7a;p=lhc%2Fweb%2Fwiklou.git Remove getLocalServerInstance try/catch in UIDGenerator and DBLockManager Follows-up 17c91ad610 in which the exception was removed. Change-Id: If0c8465d0e04f69f29f3f2602dac7ae4538f7542 --- diff --git a/includes/filebackend/lockmanager/DBLockManager.php b/includes/filebackend/lockmanager/DBLockManager.php index 1c389c3c29..42ebb46e6b 100644 --- a/includes/filebackend/lockmanager/DBLockManager.php +++ b/includes/filebackend/lockmanager/DBLockManager.php @@ -95,12 +95,7 @@ abstract class DBLockManager extends QuorumLockManager { if ( count( $bucket ) > 1 ) { // multiple peers // Tracks peers that couldn't be queried recently to avoid lengthy // connection timeouts. This is useless if each bucket has one peer. - try { - $this->statusCache = ObjectCache::getLocalServerInstance(); - } catch ( Exception $e ) { - trigger_error( __CLASS__ . - " using multiple DB peers without apc, xcache, or wincache." ); - } + $this->statusCache = ObjectCache::getLocalServerInstance(); break; } } diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index f781435b76..26eebcd415 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -282,11 +282,7 @@ class UIDGenerator { // Counter values would not survive accross script instances in CLI mode. $cache = null; if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) { - try { - $cache = ObjectCache::getLocalServerInstance(); - } catch ( Exception $e ) { - // not supported - } + $cache = ObjectCache::getLocalServerInstance(); } if ( $cache ) { $counter = $cache->incr( $bucket, $count );