Fix UserNotificationAction::createStackable()
authorTim Düsterhus <timwolla@googlemail.com>
Tue, 31 Mar 2015 23:50:06 +0000 (01:50 +0200)
committerTim Düsterhus <timwolla@googlemail.com>
Tue, 31 Mar 2015 23:50:06 +0000 (01:50 +0200)
Use `uksort` instead of `usort` as the keys of the array are
userIDs instead of simple ascending numbers.

This fixes up commit 8518f3636eae69065e52ff7c75208ed34fa6f87c
„Working around a few possible deadlocks by sorting values“

wcfsetup/install/files/lib/data/user/notification/UserNotificationAction.class.php

index 4079a706798907711971b78a9590332036e5e379..02dd847d1d5a8a93f73b3b4c7bc8cebf52c92b5b 100644 (file)
@@ -112,7 +112,7 @@ class UserNotificationAction extends AbstractDatabaseObjectAction {
                        );
                }
                
-               usort($notifications, function ($a, $b) {
+               uksort($notifications, function ($a, $b) {
                        if ($a['object']->notificationID == $b['object']->notificationID) {
                                return 0;
                        }