Procházet zdrojové kódy

If cURL is not installed, the script stops with a fatal error. (#3519)

* If cURL is not installed, the script stops with a fatal error.

The script stops with the following message.
Fatal error: Uncaught Error: Call to undefined function curl_version()

* Update app/install.php

Fix whitespace

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
ThomasSmallert před 5 roky
rodič
revize
efba11ee37
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      app/install.php

+ 5 - 1
app/install.php

@@ -402,7 +402,11 @@ function printStep1() {
 	<noscript><p class="alert alert-warn"><span class="alert-head"><?= _t('gen.short.attention') ?></span> <?= _t('install.javascript_is_better') ?></p></noscript>
 	<noscript><p class="alert alert-warn"><span class="alert-head"><?= _t('gen.short.attention') ?></span> <?= _t('install.javascript_is_better') ?></p></noscript>
 
 
 	<?php
 	<?php
-	$version = curl_version();
+	if (function_exists('curl_version')) {
+		$version = curl_version();
+	} else {
+		$version['version'] = '';
+	}
 	printStep1Template('php', $res['php'], [PHP_VERSION, FRESHRSS_MIN_PHP_VERSION]);
 	printStep1Template('php', $res['php'], [PHP_VERSION, FRESHRSS_MIN_PHP_VERSION]);
 	printStep1Template('pdo', $res['pdo']);
 	printStep1Template('pdo', $res['pdo']);
 	printStep1Template('curl', $res['curl'], [$version['version']]);
 	printStep1Template('curl', $res['curl'], [$version['version']]);