Skip to content

Commit a0536fa

Browse files
janbarasekdg
authored andcommitted
Image: added __toString() return statement + __sleep() return type.
1 parent f411f24 commit a0536fa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Utils/Image.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ public function __toString(): string
519519
throw $e;
520520
}
521521
trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);
522+
return '';
522523
}
523524
}
524525

@@ -614,7 +615,7 @@ public function __clone()
614615
/**
615616
* Prevents serialization.
616617
*/
617-
public function __sleep()
618+
public function __sleep(): array
618619
{
619620
throw new Nette\NotSupportedException('You cannot serialize or unserialize ' . self::class . ' instances.');
620621
}

0 commit comments

Comments
 (0)