mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Fixes #15122: Fixed yii\db\Command::getRawSql() to properly replace expressions
				
					
				
			This commit is contained in:
		
				
					committed by
					
						
						Alexander Makarov
					
				
			
			
				
	
			
			
			
						parent
						
							acce1db53b
						
					
				
				
					commit
					d32b80eec9
				
			@ -130,6 +130,7 @@ Yii Framework 2 Change Log
 | 
				
			|||||||
- Bug #14773: Fixed `yii\widgets\ActiveField::$options` does not support 'class' option in array format (klimov-paul)
 | 
					- Bug #14773: Fixed `yii\widgets\ActiveField::$options` does not support 'class' option in array format (klimov-paul)
 | 
				
			||||||
- Bug #14902: Fixed PHP notice in `yii\web\MultipartFormDataParser` (olimsaidov)
 | 
					- Bug #14902: Fixed PHP notice in `yii\web\MultipartFormDataParser` (olimsaidov)
 | 
				
			||||||
- Bug #14921: Fixed bug with replacing numeric keys in `yii\helpers\Url::current()` (rob006)
 | 
					- Bug #14921: Fixed bug with replacing numeric keys in `yii\helpers\Url::current()` (rob006)
 | 
				
			||||||
 | 
					- Bug #15122: Fixed bug with sql error if params has expression in `yii\db\Command::getRawSql()` (hiscaler)
 | 
				
			||||||
- Enh #4479: Implemented REST filters (klimov-paul)
 | 
					- Enh #4479: Implemented REST filters (klimov-paul)
 | 
				
			||||||
- Enh #4495:  Added closure support in `yii\i18n\Formatter` (developeruz)
 | 
					- Enh #4495:  Added closure support in `yii\i18n\Formatter` (developeruz)
 | 
				
			||||||
- Enh #5786: Allowed to use custom constructors in ActiveRecord-based classes (ElisDN, klimov-paul)
 | 
					- Enh #5786: Allowed to use custom constructors in ActiveRecord-based classes (ElisDN, klimov-paul)
 | 
				
			||||||
 | 
				
			|||||||
@ -211,7 +211,7 @@ class Command extends Component
 | 
				
			|||||||
                $params[$name] = ($value ? 'TRUE' : 'FALSE');
 | 
					                $params[$name] = ($value ? 'TRUE' : 'FALSE');
 | 
				
			||||||
            } elseif ($value === null) {
 | 
					            } elseif ($value === null) {
 | 
				
			||||||
                $params[$name] = 'NULL';
 | 
					                $params[$name] = 'NULL';
 | 
				
			||||||
            } elseif (!is_object($value) && !is_resource($value)) {
 | 
					            } elseif ((!is_object($value) && !is_resource($value)) || $value instanceof Expression) {
 | 
				
			||||||
                $params[$name] = $value;
 | 
					                $params[$name] = $value;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user