diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 3b3aade3dc..28d049479c 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -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 diff --git a/framework/db/oci/Schema.php b/framework/db/oci/Schema.php index db2bf36f2f..f6866e09cc 100644 --- a/framework/db/oci/Schema.php +++ b/framework/db/oci/Schema.php @@ -414,7 +414,7 @@ SQL; 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 {