Skip to content

Commit

Permalink
fix: getFileName() now returns null if empty filename
Browse files Browse the repository at this point in the history
If no log files exist (ie after deleting all files), a deprecation is emited by getFileName function (rap2hpoutre#277)
  • Loading branch information
thdaguin authored Feb 26, 2023
1 parent c4148ec commit 321bd67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ public function getFolderName()
*/
public function getFileName()
{
if(!$this->file) {
return null;
}

return basename($this->file);
}

Expand Down

0 comments on commit 321bd67

Please sign in to comment.