minor fix while empty search condition

This commit is contained in:
fbsanchez 2021-04-07 20:31:24 +02:00
parent b62dc5c0c2
commit c64f05dc17

View File

@ -177,7 +177,9 @@ if (is_ajax() === true) {
$agents_aux = [];
foreach ($agents as $key => $value) {
if (preg_match('/'.$search.'/', io_safe_output($value)) === true) {
if (empty($search) === true) {
$agents_aux[$key] = $value;
} else if (preg_match('/'.$search.'/', io_safe_output($value)) === true) {
$agents_aux[$key] = $value;
}
}