stepanenko3 / nova-logs-tool

A Laravel Nova tool to manage and keep track of each one of your logs files.
MIT License
26 stars 11 forks source link

Error: A function with return type must return a value #5

Closed hoczeus closed 2 years ago

hoczeus commented 2 years ago

PHP 8.1.6 Laravel 9.18.0 Nova 4.10.0

{
    "message": "A function with return type must return a value",
    "exception": "Symfony\\Component\\ErrorHandler\\Error\\FatalError",
    "file": ".\\vendor\\stepanenko3\\nova-logs-tool\\src\\LogsService.php",
    "line": 95,
    "trace": []
}

From:

        if (File::size($logFile) > self::MAX_FILE_SIZE) {
            return;
        }

To:

        if (File::size($logFile) > self::MAX_FILE_SIZE) {
            return [];
        }

seems to resolve the error

P.S. Thank you for this awesome package!

abordage commented 2 years ago

Already fixed (https://github.com/stepanenko3/nova-logs-tool/pull/4), but no new release

hoczeus commented 2 years ago

Oh, sorry missed that. Thank you

abordage commented 2 years ago

@stepanenko3 please, release a new version

stepanenko3 commented 2 years ago

@abordage I release it. Sorry for delay