Skip to content

Commit f6acf97

Browse files
ikeedorap2hpoutre
authored andcommitted
fix setFolder method (#188)
$this->storage_path expected to be a string, not an array
1 parent 98a333e commit f6acf97

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,10 @@ public function setFolder($folder)
5757
if (app('files')->exists($folder)) {
5858
$this->folder = $folder;
5959
}
60-
if(is_array($this->storage_path)){
61-
foreach ($this->storage_path as $value) {
62-
$logsPath = $value . '/' . $folder;
63-
if (app('files')->exists($logsPath)) {
64-
$this->folder = $folder;
65-
break;
66-
}
60+
if ($this->storage_path) {
61+
$logsPath = $this->storage_path . '/' . $folder;
62+
if (app('files')->exists($logsPath)) {
63+
$this->folder = $folder;
6764
}
6865
}
6966
}

0 commit comments

Comments
 (0)