From 3b5567818951823b6bf1af862e6accfa7f6efc99 Mon Sep 17 00:00:00 2001 From: maynardsmith Date: Thu, 7 Jan 2021 16:26:22 +0000 Subject: [PATCH] Accept PHP memory_limit of -1 as meeting requirement A PHP memory_limit of '-1' is specified as 'unlimited'. Before the change the checkmemory() function generates a Warning if the limit is set to -1. This shows up as a Warning in the Drupal Status Report, but more seriously also prevents the Drupal database update process (mydomain.com/update.php) from running. After the change the value '-1' is accepted as meeting the requirement. --- Civi/Install/Requirements.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Install/Requirements.php b/Civi/Install/Requirements.php index 813b2f6f19..e35d242d49 100644 --- a/Civi/Install/Requirements.php +++ b/Civi/Install/Requirements.php @@ -173,7 +173,7 @@ class Requirements { if ($mem < $min && $mem > 0) { $results['severity'] = $this::REQUIREMENT_ERROR; } - elseif ($mem < $recommended && $mem != 0) { + elseif ($mem < $recommended && $mem != 0 && $mem != -1) { $results['severity'] = $this::REQUIREMENT_WARNING; } elseif ($mem == 0) { -- 2.25.1