diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index fa6e7905..5d745370 100644 --- a/application/common/controller/Backend.php +++ b/application/common/controller/Backend.php @@ -507,7 +507,7 @@ class Backend extends Controller } $order = []; foreach ($orderby as $k => $v) { - $order[$v[0]] = $v[1]; + $order[$v[0]] = strtoupper($v[1] ?? '') === 'DESC' ? 'DESC' : 'ASC'; } $field = $field ? $field : 'name';