CC-4215: Smart Playlist: Exception happens when generate with criteria Length is 2012-08-10 14:00:00

- fixed
This commit is contained in:
James 2012-08-13 10:59:21 -04:00
parent 028f6636dd
commit 09897064c6
1 changed files with 1 additions and 1 deletions

View File

@ -976,7 +976,7 @@ EOT;
$column = CcFilesPeer::getTableMap()->getColumnByPhpName(self::$criteria2PeerMap[$d['sp_criteria_field']]);
// validation on type of column
if ($d['sp_criteria_field'] == 'length') {
if (!preg_match("/(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) {
if (!preg_match("/^(\d{2}):(\d{2}):(\d{2})$/", $d['sp_criteria_value'])) {
$error[] = "'Length' should be in '00:00:00' format";
}
} else if ($column->getType() == PropelColumnTypes::TIMESTAMP) {