mirror of
https://github.com/nextcloud/server.git
synced 2026-03-21 18:11:02 -04:00
Merge pull request #29802 from nextcloud/backport/29632/stable22
[stable22] fix imagecreatetruecolor() error
This commit is contained in:
commit
f64987b7f2
1 changed files with 4 additions and 0 deletions
|
|
@ -924,6 +924,10 @@ class OC_Image implements \OCP\IImage {
|
|||
* @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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue