Skip to content

Commit

Permalink
Merge branch 'release/9.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwemer committed Mar 18, 2022
2 parents 01bb15d + 4efa87f commit 722f442
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ public function getReceiverName(): string
protected function setReceiverEmails(): void
{
$emailArray = $this->getEmailsFromFlexForm();
$emailArray = $this->getEmailsFromFeGroup($emailArray, (int)$this->settings['receiver']['fe_group']);
$emailArray = $this->getEmailsFromBeGroup($emailArray, (int)$this->settings['receiver']['be_group']);
$emailArray = $this->getEmailsFromFeGroup($emailArray, (int)($this->settings['receiver']['fe_group'] ?? 0));
$emailArray = $this->getEmailsFromBeGroup($emailArray, (int)($this->settings['receiver']['be_group'] ?? 0));
$emailArray = $this->getEmailsFromPredefinedEmail(
$emailArray,
(string)$this->settings['receiver']['predefinedemail']
(string)($this->settings['receiver']['predefinedemail'] ?? '')
);
$emailArray = $this->overWriteEmailsWithTypoScript($emailArray);
$emailArray = $this->getEmailFromDevelopmentContext($emailArray);
Expand All @@ -140,7 +140,7 @@ protected function setReceiverEmails(): void
*/
protected function getEmailsFromFlexForm(): array
{
if ((int)$this->settings['receiver']['type'] === self::RECEIVERS_DEFAULT) {
if ((int)($this->settings['receiver']['type'] ?? 0) === self::RECEIVERS_DEFAULT) {
$mailRepository = ObjectUtility::getObjectManager()->get(MailRepository::class);
$emailString = TemplateUtility::fluidParseString(
$this->settings['receiver']['email'],
Expand All @@ -161,7 +161,7 @@ protected function getEmailsFromFlexForm(): array
*/
protected function getEmailsFromFeGroup(array $emailArray, int $uid): array
{
if ((int)$this->settings['receiver']['type'] === self::RECEIVERS_FRONTENDGROUP && !empty($uid)) {
if ((int)($this->settings['receiver']['type'] ?? 0) === self::RECEIVERS_FRONTENDGROUP && !empty($uid)) {
$userRepository = ObjectUtility::getObjectManager()->get(UserRepository::class);
$users = $userRepository->findByUsergroup($uid);
$emailArray = [];
Expand All @@ -186,7 +186,7 @@ protected function getEmailsFromFeGroup(array $emailArray, int $uid): array
*/
protected function getEmailsFromBeGroup(array $emailArray, int $uid): array
{
if ((int)$this->settings['receiver']['type'] === self::RECEIVERS_BACKENDGROUP && !empty($uid)) {
if ((int)($this->settings['receiver']['type'] ?? 0) === self::RECEIVERS_BACKENDGROUP && !empty($uid)) {
/** @var BackendUserRepository $beUserRepository */
$beUserRepository = ObjectUtility::getObjectManager()->get(BackendUserRepository::class);
$query = $beUserRepository->createQuery();
Expand Down Expand Up @@ -217,7 +217,7 @@ protected function getEmailsFromBeGroup(array $emailArray, int $uid): array
*/
protected function getEmailsFromPredefinedEmail(array $emailArray, string $predefinedString): array
{
if ((int)$this->settings['receiver']['type'] === self::RECEIVERS_PREDEFINED && !empty($predefinedString)) {
if ((int)($this->settings['receiver']['type'] ?? 0) === self::RECEIVERS_PREDEFINED && !empty($predefinedString)) {
$receiverString = TypoScriptUtility::overwriteValueFromTypoScript(
'',
$this->configuration['receiver.']['predefinedReceiver.'][$predefinedString . '.'],
Expand Down
3 changes: 2 additions & 1 deletion Classes/Tca/ShowFormNoteEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ protected function getRelatedFormUid(): int
{
$flexFormArray = (array)$this->data['databaseRow']['pi_flexform']['data']['main']['lDEF'];
$formUid = (int)$flexFormArray['settings.flexform.main.form']['vDEF'][0];
$formUid = $this->getLocalizedFormUid($formUid, (int)$this->data['databaseRow']['sys_language_uid'][0]);
$language = (int)($this->data['databaseRow']['sys_language_uid'][0] ?? $this->data['databaseRow']['sys_language_uid'] ?? 0);
$formUid = $this->getLocalizedFormUid($formUid, $language);
return $formUid;
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Utility/FrontendUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public static function getPropertyFromLoggedInFrontendUser(string $propertyName
public static function getDomainFromUri(string $uri): string
{
$uriParts = parse_url($uri);
return (string)$uriParts['host'];
return (string)($uriParts['host'] ?? '');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
and easy to use mailform extension with a lots of features
(spam prevention, marketing information, optin, ajax submit, diagram analysis, etc...)',
'category' => 'plugin',
'version' => '9.0.1',
'version' => '9.0.2',
'state' => 'beta',
'author' => 'Powermail Development Team',
'author_email' => 'service@in2code.de',
Expand Down

0 comments on commit 722f442

Please sign in to comment.