Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 7eeb8e1

Browse files
committed
Fixed directory for includes
include directory determination now is relative, based on the dirname(partent_file)
1 parent 63b3747 commit 7eeb8e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Config/AbstractConfig.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ abstract class AbstractConfig extends Data
2828
*/
2929
protected $filecheck = true;
3030

31+
/**
32+
* @var string
33+
*/
34+
private $currentBasepath;
35+
3136
/**
3237
* @var array
3338
*/
@@ -72,6 +77,8 @@ public function addConfig($name, $file)
7277
*/
7378
public function readConfig($file)
7479
{
80+
$this->currentBasepath = dirname($file);
81+
7582
$config = $this->readFile($file);
7683
$config = $this->extractImports($config);
7784
$config = $this->extractDefault($config);
@@ -129,7 +136,7 @@ private function extractImports(array $config)
129136
if (false === empty($import['resource'])) {
130137
$this->imports = array_replace_recursive(
131138
$this->imports,
132-
$this->readFile($import['resource'])
139+
$this->readFile($this->currentBasepath . '/' . $import['resource'])
133140
);
134141
}
135142
}

0 commit comments

Comments
 (0)