From 751a0b2c72a469a821b8a7967e30b8753db81366 Mon Sep 17 00:00:00 2001 From: vendeeglobe <54716082+vendeeglobe@users.noreply.github.com> Date: Tue, 7 Jun 2022 09:34:51 +0200 Subject: [PATCH] minor fixes --- src/action/forums.php | 2 +- src/lib/phpthumb/GD.php | 6 ++---- src/lib/phpthumb/PHPThumb.php | 2 +- src/lib/phpthumb/Plugins/Reflection.php | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/action/forums.php b/src/action/forums.php index 5a6c83c84..95029b969 100644 --- a/src/action/forums.php +++ b/src/action/forums.php @@ -13,7 +13,7 @@ // if you define pages, it must be done for all subforums and topic pages // define variables -$_pages = ''; +$pages ??= ''; $comment = null; if (!isset($noxml)) $noxml = 0; diff --git a/src/lib/phpthumb/GD.php b/src/lib/phpthumb/GD.php index 069b64650..040477137 100644 --- a/src/lib/phpthumb/GD.php +++ b/src/lib/phpthumb/GD.php @@ -729,11 +729,9 @@ public function rotateImageNDegrees(int $degrees): GD $this->workingImage = imagerotate($this->oldImage, $degrees, 0); - $newWidth = $this->currentDimensions['height']; - $newHeight = $this->currentDimensions['width']; $this->oldImage = $this->workingImage; - $this->currentDimensions['width'] = $newWidth; - $this->currentDimensions['height'] = $newHeight; + $this->currentDimensions['width'] = imagesx($this->workingImage); + $this->currentDimensions['height'] = imagesy($this->workingImage); return $this; } diff --git a/src/lib/phpthumb/PHPThumb.php b/src/lib/phpthumb/PHPThumb.php index 069278b43..f7c673637 100644 --- a/src/lib/phpthumb/PHPThumb.php +++ b/src/lib/phpthumb/PHPThumb.php @@ -6,7 +6,7 @@ * PhpThumb : PHP Thumb Library * Copyright (c) 2009, Ian Selby/Gen X Design * - * Author(s): Ian Selby + * Author(s): Ian Selby * * Licensed under the MIT License * Redistributions of files must retain the above copyright notice. diff --git a/src/lib/phpthumb/Plugins/Reflection.php b/src/lib/phpthumb/Plugins/Reflection.php index 6dc94c288..66f365b84 100644 --- a/src/lib/phpthumb/Plugins/Reflection.php +++ b/src/lib/phpthumb/Plugins/Reflection.php @@ -10,7 +10,7 @@ * * This file contains the plugin definition for the GD Reflection Lib for PHP Thumb * - * PHP Version 5.3 with GD 2.0+ + * PHP Version 7 with GD 2.2+ * PhpThumb : PHP Thumb Library * Copyright (c) 2009, Ian Selby/Gen X Design *