From f7cb923cebe65f1ef43d2d287c15e8cd9e6c362f Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Mon, 17 Mar 2014 10:25:26 -0400 Subject: [PATCH] CC-5709: Airtime Analyzer * Fixed breakage --- .../application/modules/rest/controllers/MediaController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/modules/rest/controllers/MediaController.php b/airtime_mvc/application/modules/rest/controllers/MediaController.php index 8a40b912f..05f4af259 100644 --- a/airtime_mvc/application/modules/rest/controllers/MediaController.php +++ b/airtime_mvc/application/modules/rest/controllers/MediaController.php @@ -115,7 +115,8 @@ class Rest_MediaController extends Zend_Rest_Controller $file = CcFilesQuery::create()->findPk($id); if ($file) { - $fileFromJson = json_decode($this->getRequest()->getRawBody(), true); + $fileFromJson = $file->fromArray($this->validateRequestData(json_decode($this->getRequest()->getRawBody(), true)), + BasePeer::TYPE_FIELDNAME); //Our RESTful API takes "full_path" as a field, which we then split and translate to match //our internal schema. Internally, file path is stored relative to a directory, with the directory @@ -136,7 +137,6 @@ class Rest_MediaController extends Zend_Rest_Controller } } - $file->fromArray($this->validateRequestData(json_decode($fileFromJson, true)), BasePeer::TYPE_FIELDNAME); $now = new DateTime("now", new DateTimeZone("UTC")); $file->setDbMtime($now); $file->save();