Ensure that getMeta() returns an array in the scheduled task model [MAILPOET-2385]

This commit is contained in:
wxa
2019-09-30 07:59:00 +03:00
committed by Jack Kitterhing
parent ce645306a5
commit f598137f3b
2 changed files with 2 additions and 13 deletions

View File

@ -120,7 +120,8 @@ class ScheduledTask extends Model {
}
function getMeta() {
return (Helpers::isJson($this->meta)) ? json_decode($this->meta, true) : $this->meta;
$meta = (Helpers::isJson($this->meta)) ? json_decode($this->meta, true) : $this->meta;
return !empty($meta) ? (array)$meta : [];
}
function delete() {