From 475c465b0dce5f256030aebf81537ef80bd00d6d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 26 Jan 2018 10:39:12 -0500 Subject: [PATCH] define --- web/api/app/Controller/MonitorsController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/api/app/Controller/MonitorsController.php b/web/api/app/Controller/MonitorsController.php index de5a80d68..660bee5ce 100644 --- a/web/api/app/Controller/MonitorsController.php +++ b/web/api/app/Controller/MonitorsController.php @@ -152,8 +152,9 @@ class MonitorsController extends AppController { return; } + $message = ''; if ( $this->Monitor->save($this->request->data) ) { - $message .= 'Saved'; + $message = 'Saved'; $Monitor = $this->Monitor->find('first', array( 'fields' => array('Function','ServerId'), 'conditions' => array('Id' => $id) @@ -167,7 +168,7 @@ class MonitorsController extends AppController { $this->daemonControl( $this->Monitor->id, 'start' ); } } else { - $message .= 'Error ' . print_r($this->Monitor->invalidFields(), true); + $message = 'Error ' . print_r($this->Monitor->invalidFields(), true); } $this->set(array(