From 7c0fa4571cee4c048c62292debd77ee9c9811bcc Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@enhancesoft.com> Date: Thu, 22 Mar 2018 11:32:04 +0000 Subject: [PATCH] ORM: Chain sort routine --- include/class.orm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class.orm.php b/include/class.orm.php index 08c2f209c..acb948534 100644 --- a/include/class.orm.php +++ b/include/class.orm.php @@ -1737,7 +1737,8 @@ implements ArrayAccess { function sort($key=false, $reverse=false) { // Fetch all records into the cache $this->asArray(); - return parent::sort($key, $reverse); + parent::sort($key, $reverse); + return $this; } /** -- GitLab