From 484acfbf59b8f49367bb64f1c1e6b3284714b5db Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sun, 27 Sep 2020 10:47:22 +0100 Subject: [PATCH] Remove the random_compat lib. --- common.php | 3 --- functions.inc.php | 4 ---- lib/block_random_int.php | 17 ----------------- lib/random_compat.phar.pubkey | 5 ----- lib/random_compat.txt | 4 ---- psalm.xml | 1 - 6 files changed, 34 deletions(-) delete mode 100644 lib/block_random_int.php delete mode 100644 lib/random_compat.phar.pubkey delete mode 100644 lib/random_compat.txt diff --git a/common.php b/common.php index daea0bad..5e93e225 100644 --- a/common.php +++ b/common.php @@ -68,9 +68,6 @@ Config::write($CONF); $PALANG = []; require_once("$incpath/languages/language.php"); require_once("$incpath/functions.inc.php"); -if (extension_loaded('Phar') && ( version_compare(PHP_VERSION, '7.0.0') < 0)) { - require_once("$incpath/lib/random_compat.phar"); -} if (defined('POSTFIXADMIN_CLI')) { $language = 'en'; # TODO: make configurable or autodetect from locale settings diff --git a/functions.inc.php b/functions.inc.php index e1400bff..3cafb2dc 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -834,10 +834,6 @@ function encode_header($string, $default_charset = "utf-8") { } -if (!function_exists('random_int')) { // PHP version < 7.0 - require_once(dirname(__FILE__) . '/lib/block_random_int.php'); -} - /** * Generate a random password of $length characters. diff --git a/lib/block_random_int.php b/lib/block_random_int.php deleted file mode 100644 index 5d6d9d0b..00000000 --- a/lib/block_random_int.php +++ /dev/null @@ -1,17 +0,0 @@ - -