Skip to content

Commit e2f07ce

Browse files
authored
Merge pull request #330 from secultce/develop
Tratando existência do getMetadata ao usar getTermsByOpportunity
2 parents 23bf0b1 + 9cf5632 commit e2f07ce

File tree

1 file changed

+5
-0
lines changed
  • src/protected/application/lib/MapasCulturais

1 file changed

+5
-0
lines changed

src/protected/application/lib/MapasCulturais/Utils.php

+5
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ static function getTermsByOpportunity($text, $opportunity)
211211
'avaliada' => 'monitorada',
212212
];
213213

214+
215+
if (!method_exists($opportunity, 'getMetadata')) {
216+
return $text;
217+
}
218+
214219
if ($opportunity->getMetadata('use_multiple_diligence') === 'Sim') {
215220
$text = strtr($text, $terminology);
216221
}

0 commit comments

Comments
 (0)