diff --git a/src/CoreBundle/Migrations/Schema/V200/Version20200821224243.php b/src/CoreBundle/Migrations/Schema/V200/Version20200821224243.php index 40e4af046b..9be88dac14 100644 --- a/src/CoreBundle/Migrations/Schema/V200/Version20200821224243.php +++ b/src/CoreBundle/Migrations/Schema/V200/Version20200821224243.php @@ -62,7 +62,8 @@ final class Version20200821224243 extends AbstractMigrationChamilo ); $newTypeQueries[] = sprintf( 'UPDATE message SET msg_type = %d WHERE msg_type = %d', - Message::MESSAGE_TYPE_INBOX, self::OLD_MESSAGE_STATUS_OUTBOX + Message::MESSAGE_TYPE_INBOX, + self::OLD_MESSAGE_STATUS_OUTBOX ); $newTypeQueries[] = sprintf( diff --git a/src/CoreBundle/Security/Authorization/Voter/SocialPostVoter.php b/src/CoreBundle/Security/Authorization/Voter/SocialPostVoter.php index f2b1fed9ec..78f062e1fb 100644 --- a/src/CoreBundle/Security/Authorization/Voter/SocialPostVoter.php +++ b/src/CoreBundle/Security/Authorization/Voter/SocialPostVoter.php @@ -76,7 +76,7 @@ class SocialPostVoter extends Voter return false; } - if ($post->getType() === SocialPost::TYPE_PROMOTED_MESSAGE && !$currentUser->isAdmin()) { + if (SocialPost::TYPE_PROMOTED_MESSAGE === $post->getType() && !$currentUser->isAdmin()) { return false; }