From ecdc9a249810e98c529c5bf5fc7e6be32d4a1c2f Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 26 Aug 2010 11:46:10 -0600 Subject: [PATCH] Bug #9202: Workaround PHP bug --- turba/lib/List.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/turba/lib/List.php b/turba/lib/List.php index 1dcb56748..c14126570 100644 --- a/turba/lib/List.php +++ b/turba/lib/List.php @@ -140,7 +140,11 @@ class Turba_List implements Countable } $this->_usortCriteria = $order; - usort($sorted_objects, array($this, '_cmp')); + + /* Exceptions thrown inside a sort incorrectly cause an error. See + * Bug #9202. */ + @usort($sorted_objects, array($this, '_cmp')); + $this->objects = $sorted_objects; } -- 2.11.0