mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Revert "Fix #19804: Change $this->oldAttributes to $this->_oldAttributes to avoid calling a method unnecessarily"
				
					
				
			This reverts commit 246a58163768f0b322ae28fc15200e6c33bef73f.
This commit is contained in:
		@ -24,7 +24,6 @@ Yii Framework 2 Change Log
 | 
				
			|||||||
- Bug #19770: Fix `yii\mutex\MysqlMutex` `keyPrefix` expression param binding (kamarton)
 | 
					- Bug #19770: Fix `yii\mutex\MysqlMutex` `keyPrefix` expression param binding (kamarton)
 | 
				
			||||||
- Enh #19794: Add caching in `yii\web\Request` for `getUserIP()` and `getSecureForwardedHeaderTrustedParts()` (rhertogh)
 | 
					- Enh #19794: Add caching in `yii\web\Request` for `getUserIP()` and `getSecureForwardedHeaderTrustedParts()` (rhertogh)
 | 
				
			||||||
- Bug #19795: Fix `yii\web\Response::redirect()` to prevent setting headers with URL containing new line character (bizley)
 | 
					- Bug #19795: Fix `yii\web\Response::redirect()` to prevent setting headers with URL containing new line character (bizley)
 | 
				
			||||||
- Enh #19804: Change `$this->oldAttributes` to `$this->_oldAttributes` to avoid calling a method unnecessarily (thiagotalma)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
2.0.47 November 18, 2022
 | 
					2.0.47 November 18, 2022
 | 
				
			||||||
------------------------
 | 
					------------------------
 | 
				
			||||||
 | 
				
			|||||||
@ -1762,8 +1762,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    private function isAttributeDirty($attribute, $value)
 | 
					    private function isAttributeDirty($attribute, $value)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $old_attribute = $this->_oldAttributes === null || !array_key_exists($attribute, $this->_oldAttributes) ? [] : $this->_oldAttributes[$attribute];
 | 
					        $old_attribute = $this->oldAttributes[$attribute];
 | 
				
			||||||
        if (is_array($value) && is_array($this->_oldAttributes[$attribute])) {
 | 
					        if (is_array($value) && is_array($this->oldAttributes[$attribute])) {
 | 
				
			||||||
            $value = ArrayHelper::recursiveSort($value);
 | 
					            $value = ArrayHelper::recursiveSort($value);
 | 
				
			||||||
            $old_attribute = ArrayHelper::recursiveSort($old_attribute);
 | 
					            $old_attribute = ArrayHelper::recursiveSort($old_attribute);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user