From dc51d5b0362b9acad749f55316bff0968e41f9f4 Mon Sep 17 00:00:00 2001 From: Riccardo Bessone Date: Thu, 28 Nov 2024 18:01:37 +0100 Subject: [PATCH] Fix deprecated strlen on null --- src/ColumnSortable/SortableLink.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ColumnSortable/SortableLink.php b/src/ColumnSortable/SortableLink.php index 986b0f2..8499acb 100644 --- a/src/ColumnSortable/SortableLink.php +++ b/src/ColumnSortable/SortableLink.php @@ -248,7 +248,7 @@ private static function shouldShowActive($sortColumn) private static function buildQueryString($queryParameters, $sortParameter, $direction) { $checkStrlenOrArray = function ($element) { - return is_array($element) ? $element : strlen($element); + return is_array($element) ? $element : strlen($element ?? ''); }; $persistParameters = array_filter(request()->except('sort', 'direction', 'page'), $checkStrlenOrArray);