From 0d622d66386957bec375e732f60c080da9bc0b44 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 27 Dec 2016 13:40:46 +0200 Subject: [PATCH] add local config --- src/lib/config.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/config.php b/src/lib/config.php index 388cdae..eaf7794 100644 --- a/src/lib/config.php +++ b/src/lib/config.php @@ -28,14 +28,18 @@ namespace * @author Roman Telychko * @version 1.0.20130227 * - * @return object */ public function __construct() { - $this->config = self::merge( - require( ROOT_PATH.'config/global.php' ), - require( ROOT_PATH.'config/global-local.php' ) - ); + if (file_exists(ROOT_PATH.'config/global-local.php')) { + $this->config = self::merge( + require( ROOT_PATH.'config/global.php' ), + require( ROOT_PATH.'config/global-local.php' ) + ); + } else { + $this->config = require( ROOT_PATH.'config/global.php' ); + } + } /////////////////////////////////////////////////////////////////////// -- libgit2 0.21.4