It was not a good idea to autodetection of the format anyway, but it isn't such a problem with unserialize.
$this->params = $params;
$this->legacy = false;
} else {
- $params = FormatJson::decode( $blob, true /* array */ );
- if ( $params !== null ) {
- $this->params = $params;
- $this->legacy = false;
- } else {
- $this->params = $blob === '' ? array() : explode( "\n", $blob );
- $this->legacy = true;
- }
+ $this->params = $blob === '' ? array() : explode( "\n", $blob );
+ $this->legacy = true;
}
}
return $this->params;