mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Fix filemanager file edit bug, closes #867
This commit is contained in:
@@ -33,11 +33,11 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
|
||||
* Return the contents of a given file if it can be edited in the Panel.
|
||||
*
|
||||
* @param string $path
|
||||
* @return \stdClass
|
||||
* @return string
|
||||
*
|
||||
* @throws \GuzzleHttp\Exception\RequestException
|
||||
*/
|
||||
public function getContent(string $path): stdClass
|
||||
public function getContent(string $path): string
|
||||
{
|
||||
$file = pathinfo($path);
|
||||
$file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/';
|
||||
|
||||
Reference in New Issue
Block a user