jethro-pmm
jethro-pmm copied to clipboard
Fix cleanup when there isn't an error
My last Mailchimp PR https://github.com/tbar0970/jethro-pmm/pull/984 introduced a bug. The script would break (after successfully syncing) if debug=0 and there weren't any sync errors:
PHP Fatal error: Uncaught RuntimeException: Directory name must not be empty. in /home/jethro/code/2.34.1/app/scripts/mailchimp_sync.php:351
Fixed by moving the cleanup line into the correct code block.