Skip to content

Commit 81d6b54

Browse files
committed
Fix uncaught TypeError
Fixes: `Uncaught TypeError: Return value of Jcupitt\Vips\Image::findLoad() must be of the type string, null returned`
1 parent 771696e commit 81d6b54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Image.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ public static function newFromFile(
722722
*
723723
* @return string|null The name of the load operation, or null.
724724
*/
725-
public static function findLoad(string $filename): string
725+
public static function findLoad(string $filename)
726726
{
727727
// added in 1.0.5 of the binary module
728728
if (function_exists('vips_foreign_find_load')) {
@@ -774,7 +774,7 @@ public static function newFromBuffer(
774774
*
775775
* @return string|null The name of the load operation, or null.
776776
*/
777-
public static function findLoadBuffer(string $buffer): string
777+
public static function findLoadBuffer(string $buffer)
778778
{
779779
// added in 1.0.5 of the binary module
780780
if (function_exists('vips_foreign_find_load_buffer')) {

0 commit comments

Comments
 (0)