Skip to content

Commit

Permalink
fix: Tratando existência do getMetadata ao usar getTermsByOpportunity
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnyjohnti committed Nov 27, 2024
1 parent 23808eb commit 9cf5632
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/protected/application/lib/MapasCulturais/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ static function getTermsByOpportunity($text, $opportunity)
'avaliada' => 'monitorada',
];


if (!method_exists($opportunity, 'getMetadata')) {
return $text;
}

if ($opportunity->getMetadata('use_multiple_diligence') === 'Sim') {
$text = strtr($text, $terminology);
}
Expand Down

0 comments on commit 9cf5632

Please sign in to comment.