From 1b7da6461e56258ce7f27142041961e2fc7ee588 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Fri, 3 Feb 2023 17:28:44 +0100 Subject: [PATCH] Ensure shell_exec() is available before calling it Fixes #3876 --- inc/infoutils.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/infoutils.php b/inc/infoutils.php index f89d1b3bb..53abdf728 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -76,7 +76,9 @@ function getVersionData(){ $version['type'] = 'Git'; $version['date'] = 'unknown'; - if ($date = shell_exec("git log -1 --pretty=format:'%cd' --date=short")) { + if (function_exists('shell_exec') + && $date = shell_exec("git log -1 --pretty=format:'%cd' --date=short") + ) { $version['date'] = hsc($date); } else if (file_exists(DOKU_INC . '.git/HEAD')) { // we cannot use git on the shell -- let's do it manually! -- 2.11.4.GIT