EasyEngine / cron-command

Manages cron in EasyEngine
4 stars 9 forks source link

Typo causing docker container for crons to be deleted when removing a site #51

Closed BozzaDaniel closed 2 years ago

BozzaDaniel commented 3 years ago

There is a typo in hooks.php (lines 37-41) that causes the docker container for crons to deleted.

Relevant code:

$crons           = Cron::all();

if ( empty( $cron ) ) {
    EE::exec( 'docker rm -f ' . EE_CRON_SCHEDULER );
}

The variable name in the if-statement is missing an s making the statement always true, thus deleting the container every time the function runs.