Phantom42 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/398773 )
Change subject: Fail gracefully if curl is not installed
......................................................................
Fail gracefully if curl is not installed
Bug: T166355
Change-Id: Iaf4864dc76535efc3ccd09efe1b6c4f9178130c4
---
M includes/Version.php
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/73/398773/1
diff --git a/includes/Version.php b/includes/Version.php
index c1868cb..457cd35 100644
--- a/includes/Version.php
+++ b/includes/Version.php
@@ -39,6 +39,20 @@
public function get() {
global $wgCirrusSearchClientSideSearchTimeout;
+ if ( !function_exists( 'curl_version' ) ) {
+ $phpVersionCheck = new \PHPVersionCheck();
+ $phpVersionCheck->triggerError(
+ null,
+ $phpVersionCheck->getIndexErrorOutput(
+ 'Required dependency for CirrusSearch
is missing',
+ 'CirrusSearch extension requires
<b>cURL</b> in order to operate, but it is not installed on this server.'
+ . ' Please install <b>PHP
cURL</b> extension.',
+ null
+ ),
+ null, null
+ );
+ }
+
$cache = ObjectCache::getLocalClusterInstance();
$mcKey = $cache->makeKey( 'CirrusSearch', 'Elasticsearch',
'version' );
$result = $cache->get( $mcKey );
--
To view, visit https://gerrit.wikimedia.org/r/398773
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf4864dc76535efc3ccd09efe1b6c4f9178130c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Phantom42 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits