The file on which is addressed when creating a letter verification appears to have been wrote in a way that even if you don't provide a file for the letter (null) it'll still always attempt to read the contents of the variable via the Utils::tryFopen($file, 'r') function.
Expected Behavior
A check should be performed on the $file variable to detect whether it's null or not.
Current Behavior
GuzzleHttp\Psr7\Utils::tryFopen(): Argument #1 ($filename) must be of type string, null given, called in /vendor/lob/lob-php/lib/Api/LettersApi.php on line 349
Possible Solution
I have wrote a PR with a valid fix for this issue. #187
Summary
The file on which is addressed when creating a letter verification appears to have been wrote in a way that even if you don't provide a file for the letter (
null
) it'll still always attempt to read the contents of the variable via theUtils::tryFopen($file, 'r')
function.Expected Behavior
A check should be performed on the
$file
variable to detect whether it'snull
or not.Current Behavior
GuzzleHttp\Psr7\Utils::tryFopen(): Argument #1 ($filename) must be of type string, null given, called in /vendor/lob/lob-php/lib/Api/LettersApi.php on line 349
Possible Solution
I have wrote a PR with a valid fix for this issue. #187