mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 03:26:36 +08:00
Fix #19743: Non-associative array values in AR weren't considered dirty when reordered
This commit is contained in:
committed by
GitHub
parent
301a1cf0e3
commit
a8e83abd8f
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.48 under development
|
||||
------------------------
|
||||
|
||||
- Bug #19743: Non-associative array values in AR weren't considered dirty when reordered (samdark)
|
||||
- Bug #19807: Fix REST serializer not using `serializeModel()` when working with array of models (zucha)
|
||||
- Enh #19766: Add support for PHP generators to JSON helper (vladis84)
|
||||
- Bug #19683: Updated `framework\mimeType.php` to the actual value. Fix typo in `build/controllers/MimeTypeController.php` (DeryabinSergey)
|
||||
|
||||
@ -1763,7 +1763,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
|
||||
*/
|
||||
private function isValueDifferent($newValue, $oldValue)
|
||||
{
|
||||
if (is_array($newValue) && is_array($oldValue)) {
|
||||
if (is_array($newValue) && is_array($oldValue) && !ArrayHelper::isAssociative($oldValue)) {
|
||||
$newValue = ArrayHelper::recursiveSort($newValue);
|
||||
$oldValue = ArrayHelper::recursiveSort($oldValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user