mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 22:57:40 +08:00 
			
		
		
		
	Fix #19328: Passing null to parameter #1 ($string) of type string is deprecated in yii\db\oci\Schema
				
					
				
			Co-authored-by: Kevin Desmettre <kdesmettre@oph74.fr>
This commit is contained in:
		@ -14,6 +14,7 @@ Yii Framework 2 Change Log
 | 
				
			|||||||
- Enh #19309: Optimize `yii\base\Model::attributes()` (WinterSilence)
 | 
					- Enh #19309: Optimize `yii\base\Model::attributes()` (WinterSilence)
 | 
				
			||||||
- Bug #19322: Revert force setting value to empty string in case it's `null` in `yii\validators\FilterValidator::validateAttribute()` (bizley)
 | 
					- 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 #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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2.0.45 February 11, 2022
 | 
					2.0.45 February 11, 2022
 | 
				
			||||||
 | 
				
			|||||||
@ -411,7 +411,7 @@ SQL;
 | 
				
			|||||||
        $c->phpType = $this->getColumnPhpType($c);
 | 
					        $c->phpType = $this->getColumnPhpType($c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!$c->isPrimaryKey) {
 | 
					        if (!$c->isPrimaryKey) {
 | 
				
			||||||
            if (stripos($column['DATA_DEFAULT'], 'timestamp') !== false) {
 | 
					            if (stripos((string) $column['DATA_DEFAULT'], 'timestamp') !== false) {
 | 
				
			||||||
                $c->defaultValue = null;
 | 
					                $c->defaultValue = null;
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                $defaultValue = $column['DATA_DEFAULT'];
 | 
					                $defaultValue = $column['DATA_DEFAULT'];
 | 
				
			||||||
@ -594,9 +594,9 @@ SQL;
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    protected function extractColumnSize($column, $dbType, $precision, $scale, $length)
 | 
					    protected function extractColumnSize($column, $dbType, $precision, $scale, $length)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $column->size = trim($length) === '' ? null : (int) $length;
 | 
					        $column->size = trim((string) $length) === '' ? null : (int) $length;
 | 
				
			||||||
        $column->precision = trim($precision) === '' ? null : (int) $precision;
 | 
					        $column->precision = trim((string) $precision) === '' ? null : (int) $precision;
 | 
				
			||||||
        $column->scale = trim($scale) === '' ? null : (int) $scale;
 | 
					        $column->scale = trim((string) $scale) === '' ? null : (int) $scale;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user