Skip to content

Commit d31bc7c

Browse files
authored
Merge pull request #1507 from Ultimater/fix-1506-cannot-create-controllers
Fix #1506 config file locating issue
2 parents ffb6537 + fa16acc commit d31bc7c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

scripts/Phalcon/Builder/AllModels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(array $options = [])
5656

5757
public function build()
5858
{
59-
if ($this->options->offsetExists('directory')) {
59+
if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) {
6060
$this->path->setRootPath($this->options->get('directory'));
6161
}
6262

scripts/Phalcon/Builder/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(array $options = [])
5858
*/
5959
public function build()
6060
{
61-
if ($this->options->offsetExists('directory')) {
61+
if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) {
6262
$this->path->setRootPath($this->options->get('directory'));
6363
}
6464

scripts/Phalcon/Builder/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function build()
7474
. 'templates' . DIRECTORY_SEPARATOR . 'module';
7575
}
7676

77-
if ($this->options->offsetExists('directory')) {
77+
if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) {
7878
$this->path->setRootPath($this->options->get('directory'));
7979
}
8080

scripts/Phalcon/Builder/Project.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Project extends Component
6666
*/
6767
public function build()
6868
{
69-
if ($this->options->offsetExists('directory')) {
69+
if ($this->options->offsetExists('directory') && $this->options->get('directory') !== null) {
7070
$this->path->setRootPath($this->options->get('directory'));
7171
}
7272

0 commit comments

Comments
 (0)