-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable29] fix(mail): Fix big logos in mail templates for Outlook #46627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Joas Schilling <[email protected]>
| } | ||
|
|
||
| if ($key === 'logo') { | ||
| $this->config->deleteAppValue('theming', 'logoDimensions'); |
Check notice
Code scanning / Psalm
DeprecatedMethod
| $content = file_get_contents($tmpFile); | ||
| $newImage = @imagecreatefromstring($content); | ||
| if ($newImage !== false) { | ||
| $this->config->setAppValue('theming', 'logoDimensions', imagesx($newImage) . 'x' . imagesy($newImage)); |
Check notice
Code scanning / Psalm
DeprecatedMethod
| } elseif (str_starts_with($detectedMimeType, 'image/svg')) { | ||
| $matched = preg_match('/viewbox=["\']\d* \d* (\d*\.?\d*) (\d*\.?\d*)["\']/i', $content, $matches); | ||
| if ($matched) { | ||
| $this->config->setAppValue('theming', 'logoDimensions', $matches[1] . 'x' . $matches[2]); |
Check notice
Code scanning / Psalm
DeprecatedMethod
| $this->config->setAppValue('theming', 'logoDimensions', $matches[1] . 'x' . $matches[2]); | ||
| } else { | ||
| $this->logger->warning('Could not read logo image dimensions to optimize for mail header'); | ||
| $this->config->deleteAppValue('theming', 'logoDimensions'); |
Check notice
Code scanning / Psalm
DeprecatedMethod
| } | ||
| } else { | ||
| $this->logger->warning('Could not read logo image dimensions to optimize for mail header'); | ||
| $this->config->deleteAppValue('theming', 'logoDimensions'); |
Check notice
Code scanning / Psalm
DeprecatedMethod
| $content = file_get_contents($tmpFile); | ||
| $newImage = @imagecreatefromstring($content); | ||
| if ($newImage !== false) { | ||
| $this->config->setAppValue('theming', 'logoDimensions', imagesx($newImage) . 'x' . imagesy($newImage)); |
Check notice
Code scanning / Psalm
PossiblyFalseOperand
| $content = file_get_contents($tmpFile); | ||
| $newImage = @imagecreatefromstring($content); | ||
| if ($newImage !== false) { | ||
| $this->config->setAppValue('theming', 'logoDimensions', imagesx($newImage) . 'x' . imagesy($newImage)); |
Check notice
Code scanning / Psalm
PossiblyFalseOperand
Backport of PR #46419