Skip to content

Commit

Permalink
Added the use of the global constant if defined on the app level.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanbaidan committed Oct 24, 2023
1 parent 413fab2 commit 0ee7793
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
use Laminas\ServiceManager\Proxy\LazyServiceFactory;

$env = getenv('APPLICATION_ENV') ?: 'production';
$appConfigDir = getenv('APP_CONF_DIR') ?? '';

$dataPath = './data';
if (!empty($appConfigDir)) {
$dataPath = $appConfigDir . '/data';
if (defined('DATA_PATH')) {
$dataPath = DATA_PATH;
} elseif (!empty(getenv('APP_CONF_DIR'))) {
$dataPath = getenv('APP_CONF_DIR') . '/data';
}

return [
Expand Down

0 comments on commit 0ee7793

Please sign in to comment.