Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Jul 19, 2024

Backport of PR #46419

}

if ($key === 'logo') {
$this->config->deleteAppValue('theming', 'logoDimensions');

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\IConfig::deleteAppValue has been marked as deprecated
$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

The method OCP\IConfig::setAppValue has been marked as deprecated
} 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

The method OCP\IConfig::setAppValue has been marked as deprecated
$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

The method OCP\IConfig::deleteAppValue has been marked as deprecated
}
} 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

The method OCP\IConfig::deleteAppValue has been marked as deprecated
$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

Cannot concatenate with a possibly false false|int
$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

Cannot concatenate with a possibly false false|int
@nickvergessen nickvergessen merged commit 8bbf4ec into stable29 Jul 19, 2024
@nickvergessen nickvergessen deleted the backport/46419/stable29 branch July 19, 2024 09:03
@Altahrim Altahrim mentioned this pull request Aug 8, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants