File tree Expand file tree Collapse file tree
wcfsetup/install/files/lib/system/worker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ public function execute()
270270
271271 $ width = $ avatar ->width ;
272272 $ height = $ avatar ->height ;
273- if ($ width != $ height ) {
273+ if ($ width !== $ height && $ width >= UserAvatarFileProcessor:: AVATAR_SIZE && $ height >= UserAvatarFileProcessor:: AVATAR_SIZE ) {
274274 // make avatar quadratic
275275 // minimum size is 128x128, maximum size is 256x256
276276 $ width = $ height = \min (
@@ -293,10 +293,13 @@ public function execute()
293293 $ thumbnail = null ;
294294 }
295295
296- if (
297- $ width != UserAvatarFileProcessor::AVATAR_SIZE
298- && $ width != UserAvatarFileProcessor::AVATAR_SIZE_2X
299- ) {
296+ if ((
297+ $ width !== UserAvatarFileProcessor::AVATAR_SIZE
298+ && $ width !== UserAvatarFileProcessor::AVATAR_SIZE_2X
299+ ) || (
300+ $ height !== UserAvatarFileProcessor::AVATAR_SIZE
301+ && $ height !== UserAvatarFileProcessor::AVATAR_SIZE_2X
302+ )) {
300303 // resize avatar
301304 $ adapter = ImageHandler::getInstance ()->getAdapter ();
302305
You can’t perform that action at this time.
0 commit comments