1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-04-21 01:11:54 +02:00

Fix deprecated for PHP 8.1

This commit is contained in:
Mikael Roos 2022-05-24 16:37:50 +02:00
parent dd315dbd21
commit 5f4280d387
2 changed files with 5 additions and 5 deletions

View File

@ -2793,18 +2793,18 @@ class CImage
$lastModified = filemtime($this->pathToImage);
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
$details['cache'] = basename($this->cacheFileName);
$lastModified = filemtime($this->cacheFileName);
$details['cache'] = basename($this->cacheFileName ?? "");
$lastModified = filemtime($this->cacheFileName ?? "");
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
$this->load($file);
$details['filename'] = basename($file);
$details['filename'] = basename($file ?? "");
$details['mimeType'] = $this->getMimeType($this->fileType);
$details['width'] = $this->width;
$details['height'] = $this->height;
$details['aspectRatio'] = round($this->width / $this->height, 3);
$details['size'] = filesize($file);
$details['size'] = filesize($file ?? "");
$details['colors'] = $this->colorsTotal($this->image);
$details['includedFiles'] = count(get_included_files());
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;

View File

@ -1,6 +1,6 @@
<?php
// Version of cimage and img.php
define("CIMAGE_VERSION", "v0.8.2 (2021-10-27)");
define("CIMAGE_VERSION", "v0.8.3 (2022-05-24)");
// For CRemoteImage
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);