avoid fail when blocks are created as dynamic by default

This commit is contained in:
Robbt 2018-12-12 02:23:25 +00:00
parent 1b48f91dbd
commit c7767c8a8d
1 changed files with 5 additions and 3 deletions

View File

@ -361,10 +361,12 @@ SQL;
{
$result = CcBlockcriteriaQuery::create()->filterByDbBlockId($this->id)
->filterByDbCriteria('limit')->findOne();
$modifier = $result->getDbModifier();
$value = $result->getDbValue();
if ($result) {
$modifier = $result->getDbModifier();
$value = $result->getDbValue();
return array($value, $modifier);
}
return array($value, $modifier);
}
// this function returns sum of all track length under this block.