Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorokom3pom <contact@okom3pom.com>2021-02-15 13:28:08 +0300
committerGitHub <noreply@github.com>2021-02-15 13:28:08 +0300
commite8f4620450bafe33d3381d6641eb05b903070b77 (patch)
tree4f9bb610e179d53c01ce5cf7746b02223c4ad14b /plugins/Diagnostics
parent1f01258385d42dcf9d2c8e6316560aae9d9c06c0 (diff)
Fix warning when memory_limit = -1 (#17218)
* Fix warning when memory_limit = -1 When memory_limit = -1 (no limit) there is a warning * Add $comment translatable * Better variable name * Add translation
Diffstat (limited to 'plugins/Diagnostics')
-rw-r--r--plugins/Diagnostics/Diagnostic/MemoryLimitCheck.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Diagnostics/Diagnostic/MemoryLimitCheck.php b/plugins/Diagnostics/Diagnostic/MemoryLimitCheck.php
index 47c997ec72..a77d34a4e2 100644
--- a/plugins/Diagnostics/Diagnostic/MemoryLimitCheck.php
+++ b/plugins/Diagnostics/Diagnostic/MemoryLimitCheck.php
@@ -41,7 +41,10 @@ class MemoryLimitCheck implements Diagnostic
$memoryLimit = SettingsServer::getMemoryLimitValue();
$comment = $memoryLimit . 'M';
- if ($memoryLimit >= $this->minimumMemoryLimit) {
+ if(false === $memoryLimit) {
+ $status = DiagnosticResult::STATUS_OK;
+ $comment = $this->translator->translate('Installation_SystemCheckMemoryNoMemoryLimitSet');
+ } else if ($memoryLimit >= $this->minimumMemoryLimit) {
$status = DiagnosticResult::STATUS_OK;
} else {
$status = DiagnosticResult::STATUS_WARNING;