Skip to content

Commit

Permalink
Resolve #19327 (#19336)
Browse files Browse the repository at this point in the history
* Resolve #19327

* cast from extracted column

* Update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Bizley <pawel@positive.codes>
  • Loading branch information
longthanhtran and Bizley committed Apr 8, 2022
1 parent 06e5472 commit 4e1a37d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Yii Framework 2 Change Log
- Bug #19322: Revert force setting value to empty string in case it's `null` in `yii\validators\FilterValidator::validateAttribute()` (bizley)
- Bug #19329: Fix `yii\web\GroupUrlRule` to properly normalize prefix (bizley)
- Bug #19328: Passing null to parameter #1 ($string) of type string is deprecated in `yii\db\oci\Schema` (Arkeins)
- Bug #19237: Fix OCI PHP 8.1 passing `null` to trim() (longthanhtran)


2.0.45 February 11, 2022
Expand Down
2 changes: 1 addition & 1 deletion framework/db/oci/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ protected function createColumn($column)
if (stripos((string) $column['DATA_DEFAULT'], 'timestamp') !== false) {
$c->defaultValue = null;
} else {
$defaultValue = $column['DATA_DEFAULT'];
$defaultValue = (string) $column['DATA_DEFAULT'];
if ($c->type === 'timestamp' && $defaultValue === 'CURRENT_TIMESTAMP') {
$c->defaultValue = new Expression('CURRENT_TIMESTAMP');
} else {
Expand Down

0 comments on commit 4e1a37d

Please sign in to comment.