Skip to content

Commit 990103d

Browse files
committed
Fix "TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, null given"
Signed-off-by: William Desportes <[email protected]>
1 parent 5f09f01 commit 990103d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ShapeFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function saveToFile(?string $fileName = null): bool
191191
*/
192192
private function getFilename(string $extension): string
193193
{
194-
return str_replace('.*', $extension, $this->fileName);
194+
return str_replace('.*', $extension, (string) $this->fileName);
195195
}
196196

197197
/**

0 commit comments

Comments
 (0)