forked from leftypol/leftypol
GdMediaHandler.php: fix typo
This commit is contained in:
parent
1a82462d0a
commit
7d8374a45d
1 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ class GdMediaHandler implements MediaHandler {
|
||||||
|
|
||||||
|
|
||||||
private bool $strip_redraw;
|
private bool $strip_redraw;
|
||||||
private ImageMetadataReader $image_metadate_reader;
|
private ImageMetadataReader $image_metadata_reader;
|
||||||
|
|
||||||
|
|
||||||
private static function imageCreateFrom(string $file, string $mime): mixed {
|
private static function imageCreateFrom(string $file, string $mime): mixed {
|
||||||
|
@ -135,9 +135,9 @@ class GdMediaHandler implements MediaHandler {
|
||||||
* @param bool $strip_redraw If the EXIF metadata should be stripped by redrawing it.
|
* @param bool $strip_redraw If the EXIF metadata should be stripped by redrawing it.
|
||||||
* May cause the loss of color profiles. Orientation is still handled.
|
* May cause the loss of color profiles. Orientation is still handled.
|
||||||
*/
|
*/
|
||||||
public function __construct(bool $strip_redraw, ImageMetadataReader $image_metadate_reader) {
|
public function __construct(bool $strip_redraw, ImageMetadataReader $image_metadata_reader) {
|
||||||
$this->strip_redraw = $strip_redraw;
|
$this->strip_redraw = $strip_redraw;
|
||||||
$this->image_metadate_reader = $image_metadate_reader;
|
$this->image_metadata_reader = $image_metadata_reader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function supportsMime(string $mime): bool {
|
public function supportsMime(string $mime): bool {
|
||||||
|
@ -151,7 +151,7 @@ class GdMediaHandler implements MediaHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function openHandle(string $file_path, string $file_mime, int $file_kind): mixed {
|
public function openHandle(string $file_path, string $file_mime, int $file_kind): mixed {
|
||||||
$metadata = $this->image_metadate_reader->getMetadata($file_path);
|
$metadata = $this->image_metadata_reader->getMetadata($file_path);
|
||||||
if ($file_mime !== $file_mime) {
|
if ($file_mime !== $file_mime) {
|
||||||
throw new \RuntimeException("Mime mismatch on '$file_path'");
|
throw new \RuntimeException("Mime mismatch on '$file_path'");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue