From e0b29e269a57b020d2212c16b4562f32f2274b63 Mon Sep 17 00:00:00 2001 From: William Mortada Date: Wed, 25 Oct 2017 15:35:47 +0100 Subject: [PATCH] Check for existence of functions in case they haven't been defined --- install/index.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install/index.php b/install/index.php index 19f20d29c8..5774078cc5 100644 --- a/install/index.php +++ b/install/index.php @@ -1840,9 +1840,19 @@ function getSiteDir($cmsPath, $str) { * @param $showRefer */ function errorDisplayPage($errorTitle, $errorMsg, $showRefer = TRUE) { + + // Add a link to the documentation if ($showRefer) { - $docLink = CRM_Utils_System::docURL2('Installation and Upgrades', FALSE, 'Installation Guide', NULL, NULL, "wiki"); - $errorMsg .= '

' . ts("Refer to the online documentation for more information: ") . $docLink . '

'; + if (is_callable(array('CRM_Utils_System', 'docURL2'))) { + $docLink = CRM_Utils_System::docURL2('Installation and Upgrades', FALSE, 'Installation Guide', NULL, NULL, "wiki"); + } + + if (function_exists('ts')) { + $errorMsg .= '

' . ts("Refer to the online documentation for more information: ") . $docLink . '

'; + } + else { + $errorMsg .= '

' . 'Refer to the online documentation for more information: ' . $docLink . '

'; + } } include 'error.html'; -- 2.25.1