From 3c73abc786f1a3fc7678b09e5dae852bcaa3cadf Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 18 Nov 2014 10:32:03 -0500 Subject: [PATCH] SAAS-491: Edit meta data not working Fixed: Propel 1.7 does not cast string types to integers --- airtime_mvc/application/models/StoredFile.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 60e5bd6fe..eb28ff650 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -210,6 +210,13 @@ class Application_Model_StoredFile if ($dbColumn == "track_title" && (is_null($mdValue) || $mdValue == "")) { continue; } + + // Bpm gets POSTed as a string type. With Propel 1.6 this value + // was casted to an integer type before saving it to the db. But + // Propel 1.7 does not do this + if ($dbColumn == "bpm") { + $mdValue = (int) $mdValue; + } # TODO : refactor string evals if (isset($this->_dbMD[$dbColumn])) { $propelColumn = $this->_dbMD[$dbColumn];