Skip to content

Commit cee040c

Browse files
committed
Fix: issue 132 - pathinfo(): Passing null to parameter #1 () of type string is deprecated
1 parent 2a9638f commit cee040c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Attachment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function save(string $path): false|int
8181
*/
8282
public function extension(): ?string
8383
{
84-
if ($ext = pathinfo($this->filename, PATHINFO_EXTENSION)) {
84+
if ($ext = pathinfo($this->filename ?? '', PATHINFO_EXTENSION)) {
8585
return $ext;
8686
}
8787

0 commit comments

Comments
 (0)