Skip to content

Commit

Permalink
Merge pull request #1486 from BeMySlaveDarlin/fix/ISSUE-1415-model-cr…
Browse files Browse the repository at this point in the history
…eating-error

Fix/issue 1415 model creating error
  • Loading branch information
Jeckerson authored Mar 14, 2021
2 parents 4c7d97b + 0917f32 commit e65d38c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# [4.0.4](https://github.com/phalcon/cphalcon/releases/tag/v4.0.4) (2021-03-11)
# [4.0.5](https://github.com/phalcon/cphalcon/releases/tag/v4.0.5)
## Added

## Fixed
- Fixed model creation failure in webtools due to wrong variable mutation [#1415](https://github.com/phalcon/phalcon-devtools/issues/1415)

## Changed

[4.0.4](https://github.com/phalcon/cphalcon/releases/tag/v4.0.4) (2021-03-11)
## Added
- Added support for PHP `7.4` [#1482](https://github.com/phalcon/phalcon-devtools/pull/1482)

Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Component/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ public function build(): void

$adapterName = 'Phalcon\Db\Adapter\Pdo\\' . $adapter;
unset($configArray['adapter']);
if (isset($configArray['options'])) {
$configArray = $configArray['options'];
}

/** @var AbstractPdo $db */
$db = new $adapterName($configArray);

Expand Down

0 comments on commit e65d38c

Please sign in to comment.