Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix imagecreatetruecolor() error
Signed-off-by: szaimen <[email protected]>
  • Loading branch information
szaimen authored and backportbot[bot] committed Nov 19, 2021
commit 3da3e0f10b0d3eae4aeb155a3523b58fc75a9895
4 changes: 4 additions & 0 deletions lib/private/legacy/OC_Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,10 @@ public function preciseResize(int $width, int $height): bool {
* @return resource|bool|\GdImage
*/
public function preciseResizeNew(int $width, int $height) {
if (!($width > 0) || !($height > 0)) {
$this->logger->info(__METHOD__ . '(): Requested image size not bigger than 0', ['app' => 'core']);
return false;
}
if (!$this->valid()) {
$this->logger->error(__METHOD__ . '(): No image loaded', ['app' => 'core']);
return false;
Expand Down