#12643 fix pagination

This commit is contained in:
Jonathan 2023-12-15 11:34:27 +01:00
parent 3fe41179e0
commit f35e7d52ed
1 changed files with 8 additions and 15 deletions

View File

@ -1240,6 +1240,7 @@ if (is_ajax() === true) {
} }
} }
$no_return = false;
if (empty($tmp) === false && $regex !== '') { if (empty($tmp) === false && $regex !== '') {
$regex_validation = false; $regex_validation = false;
foreach (json_decode(json_encode($tmp), true) as $key => $field) { foreach (json_decode(json_encode($tmp), true) as $key => $field) {
@ -1249,28 +1250,20 @@ if (is_ajax() === true) {
} }
if ($regex_validation === false) { if ($regex_validation === false) {
unset($tmp); $no_return = true;
} }
} }
$carry[] = $tmp; if ($no_return === false) {
return $carry; $carry[] = $tmp;
return $carry;
} else {
return;
}
} }
); );
} }
if (isset($data) === true) {
$data = array_values(
array_filter(
$data,
function ($item) {
return (bool) (array) $item;
}
)
);
$count = count($data);
}
// RecordsTotal && recordsfiltered resultados totales. // RecordsTotal && recordsfiltered resultados totales.
echo json_encode( echo json_encode(
[ [