diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Database.pm b/scripts/ZoneMinder/lib/ZoneMinder/Database.pm index dcc797bd4..173c0033c 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Database.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Database.pm @@ -208,7 +208,7 @@ sub zmDbGetMonitor { return undef; } my $res = $sth->execute($id); - if ( $res ) { + if ( !$res ) { Error("Can't execute '$sql': ".$sth->errstr()); return undef; }