Skip to content

Commit 7c594e3

Browse files
committed
Add the missing hasFile() method to GenerateThumbnail
1 parent 62f8441 commit 7c594e3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wcfsetup/install/files/lib/event/file/GenerateThumbnail.class.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ public function __construct(
2323
public readonly ThumbnailFormat $thumbnailFormat,
2424
) {}
2525

26+
/**
27+
* Returns true if a file has already been set and no further files are
28+
* being accepted.
29+
*/
30+
public function hasFile(): bool
31+
{
32+
return isset($this->pathname);
33+
}
34+
2635
/**
2736
* Sets the pathname of the generated image unless it has already been set
2837
* in which case the call will throw an exception. You must check the result

0 commit comments

Comments
 (0)