Skip to content

Commit 35cffd4

Browse files
Prevent error when PHP extension iconv() not enabled.
1 parent 24c1243 commit 35cffd4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/QueryDataTable.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ protected function showDebugger(array $output): array
863863
{
864864
$query_log = $this->getConnection()->getQueryLog();
865865
array_walk_recursive($query_log, function (&$item) {
866-
if (is_string($item)) {
866+
if (is_string($item) && extension_loaded('iconv')) {
867867
$item = iconv('iso-8859-1', 'utf-8', $item);
868868
}
869869
});
@@ -943,7 +943,6 @@ public function ordering(): void
943943
* @param string $model
944944
* @param int $max_hits
945945
* @return $this
946-
*
947946
* @throws \Exception
948947
*/
949948
public function enableScoutSearch(string $model, int $max_hits = 1000): static
@@ -1084,7 +1083,6 @@ protected function applyFixedOrderingToQuery(string $keyName, array $orderedKeys
10841083
* @param string $searchKeyword
10851084
* @param mixed $searchFilters
10861085
* @return array
1087-
*
10881086
* @throws \Exception
10891087
*/
10901088
protected function performScoutSearch(string $searchKeyword, mixed $searchFilters = []): array

0 commit comments

Comments
 (0)