Skip to content

Commit cf46536

Browse files
Merge pull request #101 from culturagovbr/correcao-6976-erro-ao-criar-oportunidade-de-fluxo-continuo
fix: verificando a existência da propriedade antes de tentar acessar
2 parents 3ded870 + 1baf18b commit cf46536

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/Entities/Opportunity.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,7 @@ static function getPCachePermissionsList() {
16311631
}
16321632

16331633
protected function canUser_control($user) {
1634-
1635-
if ($this->ownerEntity->canUser('@control', $user)) {
1634+
if ($this->ownerEntity && $this->ownerEntity->canUser('@control', $user)) {
16361635
return true;
16371636
} else {
16381637
return parent::canUser_control($user);

0 commit comments

Comments
 (0)