mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Merge branch 'stable'
This commit is contained in:
commit
80917692c1
@ -35,6 +35,9 @@ class SkinImage{
|
||||
private $data;
|
||||
|
||||
public function __construct(int $height, int $width, string $data){
|
||||
if(($expected = $height * $width * 4) !== ($actual = strlen($data))){
|
||||
throw new \InvalidArgumentException("Data should be exactly $expected bytes, got $actual bytes");
|
||||
}
|
||||
$this->height = $height;
|
||||
$this->width = $width;
|
||||
$this->data = $data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user