Skip to content

Commit 921da17

Browse files
ISSUE-1491: Fixed optional options checks on model create
1 parent 3f2ca72 commit 921da17

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
## Fixed
33
- Fixed model findFirst return type error [#1478](https://github.com/phalcon/phalcon-devtools/issues/1478)
44
- Added trailing semicolon to scaffolding crud views getters [#1477](https://github.com/phalcon/phalcon-devtools/issues/1477)
5+
- Fixed optional options (namespace, abstract) checks on model create [#1491](https://github.com/phalcon/phalcon-devtools/issues/1491)
56

67
# [4.0.5](https://github.com/phalcon/cphalcon/releases/tag/v4.0.5) (2021-03-14)
78
## Fixed

src/Builder/Component/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function build(): void
172172
}
173173

174174
$entityNamespace = '';
175-
if ($this->modelOptions->getOption('namespace')) {
175+
if ($this->modelOptions->hasOption('namespace')) {
176176
$entityNamespace = $this->modelOptions->getOption('namespace')."\\";
177177
}
178178

@@ -190,7 +190,7 @@ public function build(): void
190190

191191
foreach ($db->describeReferences($this->modelOptions->getOption('name'), $schema) as $reference) {
192192
$entityNamespace = '';
193-
if ($this->modelOptions->getOption('namespace')) {
193+
if ($this->modelOptions->hasOption('namespace')) {
194194
$entityNamespace = $this->modelOptions->getOption('namespace');
195195
}
196196

0 commit comments

Comments
 (0)