From 246d0ce9e07385ec8a21f73df3359d75703e3fdf Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 8 Jan 2018 15:05:51 +0100 Subject: [PATCH] fixed warnings php in log pandora --- .../operation/events/events.build_query.php | 12 ++++++++---- pandora_console/operation/events/events_list.php | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index 832f9b3831..40560d1405 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -81,12 +81,16 @@ $events_wi_cdata = db_get_all_rows_sql('SELECT id_evento,custom_data from tevent $count_events = 0; $events_wi_cdata_id = 'OR id_evento IN ('; foreach ($events_wi_cdata as $key => $value) { - if(strpos(strtolower(base64_decode($value['custom_data'])),strtolower($search)) != false){ - $events_wi_cdata_id .= $value['id_evento']; - $count_events++; + $needle = base64_decode($value['custom_data']); + if (($needle != "") && ($search != "")) { + if(strpos(strtolower($needle),strtolower($search)) != false){ + $events_wi_cdata_id .= $value['id_evento']; + $count_events++; + } } + if ($value !== end($events_wi_cdata) && $count_events > 0) { - $events_wi_cdata_id .= ','; + $events_wi_cdata_id .= ','; $events_wi_cdata_id = str_replace(',,', ',', $events_wi_cdata_id); } } diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index f6346caece..7bf96a8f28 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -264,6 +264,7 @@ html_print_div(array('hidden' => true, if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, "EM") ) { // Save filter div for dialog echo '