From fa16accf33881d8b9eb15354f689690b3ff79d6e Mon Sep 17 00:00:00 2001 From: Kevin Yarmak Date: Mon, 5 Jul 2021 14:29:44 -0700 Subject: [PATCH] Fix #1506 config file locating issue --- scripts/Phalcon/Builder/AllModels.php | 2 +- scripts/Phalcon/Builder/Controller.php | 2 +- scripts/Phalcon/Builder/Module.php | 2 +- scripts/Phalcon/Builder/Project.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Phalcon/Builder/AllModels.php b/scripts/Phalcon/Builder/AllModels.php index 3f104da57..864ac242f 100644 --- a/scripts/Phalcon/Builder/AllModels.php +++ b/scripts/Phalcon/Builder/AllModels.php @@ -56,7 +56,7 @@ public function __construct(array $options = []) public function build() { - if ($this->options->offsetExists('directory')) { + if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) { $this->path->setRootPath($this->options->get('directory')); } diff --git a/scripts/Phalcon/Builder/Controller.php b/scripts/Phalcon/Builder/Controller.php index a93ee3641..a72ebcde1 100644 --- a/scripts/Phalcon/Builder/Controller.php +++ b/scripts/Phalcon/Builder/Controller.php @@ -58,7 +58,7 @@ public function __construct(array $options = []) */ public function build() { - if ($this->options->offsetExists('directory')) { + if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) { $this->path->setRootPath($this->options->get('directory')); } diff --git a/scripts/Phalcon/Builder/Module.php b/scripts/Phalcon/Builder/Module.php index 98fc96dcf..16cf223a3 100644 --- a/scripts/Phalcon/Builder/Module.php +++ b/scripts/Phalcon/Builder/Module.php @@ -74,7 +74,7 @@ public function build() . 'templates' . DIRECTORY_SEPARATOR . 'module'; } - if ($this->options->offsetExists('directory')) { + if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) { $this->path->setRootPath($this->options->get('directory')); } diff --git a/scripts/Phalcon/Builder/Project.php b/scripts/Phalcon/Builder/Project.php index 7a09899ee..82c12f275 100644 --- a/scripts/Phalcon/Builder/Project.php +++ b/scripts/Phalcon/Builder/Project.php @@ -66,7 +66,7 @@ class Project extends Component */ public function build() { - if ($this->options->offsetExists('directory')) { + if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) { $this->path->setRootPath($this->options->get('directory')); }