Skip to content

Commit 9cf5632

Browse files
committed
fix: Tratando existência do getMetadata ao usar getTermsByOpportunity
1 parent 23808eb commit 9cf5632

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)