Skip to content

Commit

Permalink
[TASK] Fixed Scheduler PHP Error
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepnitsan committed Dec 17, 2024
1 parent f0313ca commit 17f1bb9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/Task/SendExtensionsReportTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class SendExtensionsReportTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask
*/
public $mailFrom;

/**
* @var string
*/
public $mailSender;

/**
* @var string
*/
Expand Down Expand Up @@ -61,7 +66,7 @@ protected function getExtReoport()
$excludeExtensions = GeneralUtility::trimExplode(',', $this->excludeExtensionsFromCheck);

foreach ($allExtensions as $extensionKey => $nsExt) {
if (strtolower($nsExt['type']) == 'local' && $nsExt['key'] != 'ns_ext_compatibility' && !in_array($extensionKey, $excludeExtensions) && $nsExt['updateAvailable'] == true && $nsExt['installed'] == true) {
if (strtolower($nsExt['type']) == 'local' && $nsExt['key'] != 'ns_ext_compatibility' && !in_array($extensionKey, $excludeExtensions) && isset($nsExt['updateAvailable']) && $nsExt['updateAvailable'] == true && isset($nsExt['installed']) && $nsExt['installed'] == true) {
$extArray = $extensionRepository->findByExtensionKeyOrderedByVersion($nsExt['key']);

if ($extArray[0]) {
Expand Down Expand Up @@ -132,7 +137,7 @@ protected function sendMail($receiver = [], $sender = [], $subject = '', $body =
$mail->setFrom($sender);
$mail->setTo($receiver);
$mail->setSubject($subject);
if (version_compare(TYPO3_branch, '11', '<')) {
if (version_compare(TYPO3_branch, '10', '<')) {
$mail->setBody($body, $bodyType);
} else {
$mail->html($body, $bodyType);
Expand Down

0 comments on commit 17f1bb9

Please sign in to comment.