Fix when using a custom state

This commit is contained in:
Javier Gonzalez 2022-03-08 17:10:29 +01:00
parent 05b5ca9b15
commit 858ab62fc4
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ my $dbh = zmDbConnect();
Debug("Command: $command");
if ( $command and ( $command !~ /^(?:start|stop|restart|status|logrot|version)$/ ) ) {
# Check to see if it's a valid run state
if ($state = ZoneMinder->find_one(Name=>$command)) {
if ($state = ZoneMinder::State->find_one(Name=>$command)) {
$state->{Definitions} = [];
foreach (split(',', $state->{Definition})) {
my @state = split(':', $_);