mirror of https://github.com/MISP/MISP
fix: [internal] Code style
parent
c944c4ae3d
commit
9c346e8282
|
@ -2181,7 +2181,7 @@ class ServersController extends AppController
|
|||
if ($this->_isRest()) {
|
||||
return $this->RestResponse->saveFailResponse('Servers', 'addFromJson', false, $this->Server->validationErrors, $this->response->type());
|
||||
} else {
|
||||
$this->Flash->error(__('Could not save the server. Error: %s', json_encode($this->Server->validationErrors, true)));
|
||||
$this->Flash->error(__('Could not save the server. Error: %s', json_encode($this->Server->validationErrors)));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3267,14 +3267,13 @@ class AppModel extends Model
|
|||
* Returns MISP version from VERSION.json file as array with major, minor and hotfix keys.
|
||||
*
|
||||
* @return array
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function checkMISPVersion()
|
||||
{
|
||||
static $versionArray;
|
||||
if ($versionArray === null) {
|
||||
$content = FileAccessTool::readFromFile(ROOT . DS . 'VERSION.json');
|
||||
$versionArray = JsonTool::decode($content);
|
||||
$versionArray = FileAccessTool::readJsonFromFile(ROOT . DS . 'VERSION.json', true);
|
||||
}
|
||||
return $versionArray;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue