diff --git a/module/message/model.php b/module/message/model.php index 0b4cbfa705..3704dcdc99 100644 --- a/module/message/model.php +++ b/module/message/model.php @@ -77,13 +77,14 @@ class messageModel extends model $requestType = $config->requestType; if(defined('RUN_MODE') and RUN_MODE == 'api') { - if(file_exists($this->app->getConfigRoot() . 'my.php')) + $configRoot = $this->app->getConfigRoot(); + if(file_exists($configRoot . 'my.php')) { - include $this->app->getConfigRoot() . 'my.php'; + include $configRoot . 'my.php'; } else { - include $this->app->getConfigRoot() . 'config.php'; + include $configRoot . 'config.php'; } }