From 99d63752d01290f579c579f1699f4a504d7ceef9 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 6 Jun 2018 22:29:49 -0400 Subject: [PATCH] Fix failing tests. --- lib/Cake/Model/Datasource/DboSource.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 41fb387c0..cbf5d925c 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -3043,8 +3043,11 @@ class DboSource extends DataSource { * @return string ORDER BY clause */ public function order($keys, $direction = 'ASC', Model $Model = null) { - $keys = array_filter((array)$keys); - + if (!is_array($keys)) { + $keys = array($keys); + } + $keys = array_filter($keys); + $result = array(); while (!empty($keys)) { $key = key($keys);