From f7cc6e5534058dd735467fc20b5f36e800f3ac3f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 9 Feb 2016 10:42:40 -0800 Subject: [PATCH] CRM_Core_Config_MagicMerge - Fix warning on demos sites Apparently, createDir() will return FALSE if the folder already exists *or* if the creation-act fails. We only want to display a warning if the creation-act fails. --- CRM/Core/Config/MagicMerge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Config/MagicMerge.php b/CRM/Core/Config/MagicMerge.php index d4bc55978b..e748cf299f 100644 --- a/CRM/Core/Config/MagicMerge.php +++ b/CRM/Core/Config/MagicMerge.php @@ -225,7 +225,7 @@ class CRM_Core_Config_MagicMerge { if ($value) { $value = CRM_Utils_File::addTrailingSlash($value); if (isset($this->map[$k][2]) && in_array('mkdir', $this->map[$k][2])) { - if (!CRM_Utils_File::createDir($value, FALSE)) { + if (!is_dir($value) && !CRM_Utils_File::createDir($value, FALSE)) { CRM_Core_Session::setStatus(ts('Failed to make directory (%1) at "%2". Please update the settings or file permissions.', array( 1 => $k, 2 => $value, -- 2.25.1