diff --git a/web/skins/classic/views/zones.php b/web/skins/classic/views/zones.php index 5d3c08ba4a..c77737b128 100644 --- a/web/skins/classic/views/zones.php +++ b/web/skins/classic/views/zones.php @@ -25,7 +25,7 @@ } else if ( isset($_REQUEST['mids']) ) { $mids = array_map(function($mid){return validCardinal($mid);}, $_REQUEST['mids'] ); } else { - $mids = dbFetchAll('SELECT Id FROM Monitors'.($user->unviewableMonitorIds() ? 'WHERE Id IN ('.$user->viewableMonitorIds().')' : ''), 'Id'); + $mids = dbFetchAll('SELECT Id FROM Monitors'.($user->unviewableMonitorIds() ? ' WHERE Id IN ('.implode(',', array_map(function(){return '?';}, $user->viewableMonitorIds())).')' : ''), 'Id', $user->viewableMonitorIds()); } if ( !($mids and count($mids)) ) {