Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 431134e

Browse files
Site Logo code - fix coding standards issues
2 parents cfd247e + 4467d78 commit 431134e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎Plugin/Theme/Block/Html/Header/Logo.php‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ private function checkAndUploadToCloudinary($logoPath, $publicId, $originalUrl)
196196

197197
// Clean up temp file if it was downloaded
198198
if (strpos($logoFullPath, '/tmp/') !== false) {
199-
@unlink($logoFullPath);
199+
try {
200+
unlink($logoFullPath);
201+
} catch (\Exception $unlinkException) {
202+
$this->logger->debug('Could not delete temporary logo file: ' . $unlinkException->getMessage());
203+
}
200204
}
201205

202206
return $uploadResult['secure_url'];
@@ -274,7 +278,12 @@ private function verifyImageAccessibility($url)
274278
]
275279
]);
276280

277-
$headers = @get_headers($url, 1, $context);
281+
$headers = false;
282+
try {
283+
$headers = get_headers($url, 1, $context);
284+
} catch (\Exception $headerException) {
285+
$this->logger->debug('Could not retrieve headers for URL: ' . $headerException->getMessage());
286+
}
278287

279288
if ($headers && isset($headers[0])) {
280289
// Check for successful HTTP status codes (200, 201, etc.)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /