Fix unserialize parameters issues in old models
[MAILPOET-3296]
This commit is contained in:
committed by
Veljko V
parent
ec19b565f5
commit
df22724cf7
@@ -16,10 +16,16 @@ class Form extends Model {
|
||||
public static $_table = MP_FORMS_TABLE; // phpcs:ignore PSR2.Classes.PropertyDeclaration
|
||||
|
||||
public function getSettings() {
|
||||
if (is_array($this->settings) || $this->settings === null) {
|
||||
return $this->settings;
|
||||
}
|
||||
return WPFunctions::get()->isSerialized($this->settings) ? unserialize($this->settings) : $this->settings;
|
||||
}
|
||||
|
||||
public function getBody() {
|
||||
if (is_array($this->body) || $this->body === null) {
|
||||
return $this->body;
|
||||
}
|
||||
return WPFunctions::get()->isSerialized($this->body) ? unserialize($this->body) : $this->body;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user