A free, self-hostable news aggregator…
Remove code for PHP 5.3.2-
Alexandre Alapetitedd7d5855e3ae
diff --git a/README.fr.md b/README.fr.mdindex 577c7b73e..507a6010d 100644--- a/README.fr.md+++ b/README.fr.md@@ -32,7 +32,7 @@ Nous sommes une communauté amicale.* Serveur modeste, par exemple sous Linux ou Windows* Fonctionne même sur un Raspberry Pi 1 avec des temps de réponse < 1s (testé sur 150 flux, 22k articles)* Serveur Web Apache2 (recommandé), ou nginx, lighttpd (non testé sur les autres)-* PHP 5.3.3+ (PHP 5.3.7+ recommandé, et PHP 5.5+ pour les performances, et PHP 7+ pour d’encore meilleures performances)+* PHP 5.3.3+ (PHP 5.4+ recommandé, et PHP 5.5+ pour les performances, et PHP 7+ pour d’encore meilleures performances)* Requis : [PDO_MySQL](http://php.net/pdo-mysql) ou [PDO_SQLite](http://php.net/pdo-sqlite), [cURL](http://php.net/curl), [GMP](http://php.net/gmp) (pour accès API sur plateformes < 64 bits), [IDN](http://php.net/intl.idn) (pour les noms de domaines internationalisés)* Recommandés : [iconv](http://php.net/iconv), [JSON](http://php.net/json), [mbstring](http://php.net/mbstring), [Zip](http://php.net/zip), [zlib](http://php.net/zlib)* Inclus par défaut : [DOM](http://php.net/dom), [XML](http://php.net/xml)…diff --git a/README.md b/README.mdindex 9a8355f9c..cc1e258ff 100644--- a/README.md+++ b/README.md@@ -32,7 +32,7 @@ We are a friendly community.* Light server running Linux or Windows* It even works on Raspberry Pi 1 with response time under a second (tested with 150 feeds, 22k articles)* A web server: Apache2 (recommended), nginx, lighttpd (not tested on others)-* PHP 5.3.3+ (PHP 5.3.7+ recommended, and PHP 5.5+ for performance, and PHP 7 for even higher performance)+* PHP 5.3.3+ (PHP 5.4+ recommended, and PHP 5.5+ for performance, and PHP 7 for even higher performance)* Required extensions: [PDO_MySQL](http://php.net/pdo-mysql) or [PDO_SQLite](http://php.net/pdo-sqlite), [cURL](http://php.net/curl), [GMP](http://php.net/gmp) (for API access on platforms < 64 bits), [IDN](http://php.net/intl.idn) (for Internationalized Domain Names)* Recommended extensions: [iconv](http://php.net/iconv), [JSON](http://php.net/json), [mbstring](http://php.net/mbstring), [Zip](http://php.net/zip), [zlib](http://php.net/zlib)* Enabled by default: [DOM](http://php.net/dom), [XML](http://php.net/xml)…diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.phpindex e472b1e7f..79bd0170b 100644--- a/app/Models/ConfigurationSetter.php+++ b/app/Models/ConfigurationSetter.php@@ -129,12 +129,7 @@ class FreshRSS_ConfigurationSetter {// Verify URL and add default value when neededif (isset($value['url'])) {- $is_url = (- filter_var($value['url'], FILTER_VALIDATE_URL) ||- (version_compare(PHP_VERSION, '5.3.3', '<') &&- (strpos($value, '-') > 0) &&- ($value === filter_var($value, FILTER_SANITIZE_URL)))- ); //PHP bug #51192+ $is_url = filter_var($value['url'], FILTER_VALIDATE_URL);if (!$is_url) {continue;}diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex b5ba78889..cf56ae9b2 100644--- a/lib/lib_rss.php+++ b/lib/lib_rss.php@@ -15,35 +15,6 @@ if (!function_exists('json_encode')) {}}-if (!function_exists('array_replace_recursive')) { //PHP 5.2- function arr_recurse($array, $array1) {- foreach ($array1 as $key => $value) {- if (!isset($array[$key]) || (isset($array[$key]) && !is_array($array[$key]))) {- $array[$key] = array(); //create new key in $array, if it is empty or not an array- }- if (is_array($value)) {- $value = arr_recurse($array[$key], $value); // overwrite the value in the base array- }- $array[$key] = $value;- }- return $array;- }- function array_replace_recursive($array, $array1) { //http://php.net/manual/function.array-replace-recursive.php#92574- // handle the arguments, merge one by one- $args = func_get_args();- $array = $args[0];- if (!is_array($array)) {- return $array;- }- for ($i = 1; $i < count($args); $i++) {- if (is_array($args[$i])) {- $array = arr_recurse($array, $args[$i]);- }- }- return $array;- }-}-/*** Build a directory path by concatenating a list of directory names.*@@ -103,9 +74,7 @@ function checkUrl($url) {$url = 'http://' . $url;}$url = idn_to_puny($url); //PHP bug #53474 IDN- if (filter_var($url, FILTER_VALIDATE_URL) ||- (version_compare(PHP_VERSION, '5.3.3', '<') && (strpos($url, '-') > 0) && //PHP bug #51192- ($url === filter_var($url, FILTER_SANITIZE_URL)))) {+ if (filter_var($url, FILTER_VALIDATE_URL)) {return $url;} else {return false;@@ -379,12 +348,10 @@ function httpAuthUser() {}function cryptAvailable() {- if (version_compare(PHP_VERSION, '5.3.3', '>=')) {- try {- $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';- return $hash === @crypt('password', $hash);- } catch (Exception $e) {- }+ try {+ $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';+ return $hash === @crypt('password', $hash);+ } catch (Exception $e) {}return false;}@@ -416,7 +383,7 @@ function check_install_php() {$pdo_mysql = extension_loaded('pdo_mysql');$pdo_sqlite = extension_loaded('pdo_sqlite');return array(- 'php' => version_compare(PHP_VERSION, '5.2.1') >= 0,+ 'php' => version_compare(PHP_VERSION, '5.3.3') >= 0,'minz' => file_exists(LIB_PATH . '/Minz'),'curl' => extension_loaded('curl'),'pdo' => $pdo_mysql || $pdo_sqlite,