lundi 11 septembre 2017

Vague Error Message in Laravel FileSystem Unlink

Good day,

I modified this file.

vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php

This is the function I modified.

public function handleError($level, $message, $file = '', $line = 0, $context = [])

I made it send me an email. The email has the $message and the $file and the $line.

This is what the email said.

MESSAGE FILE vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php LINE 126

The message is blank, but it's running into an error in a file. I open the file.

public function delete($paths)
{
    $paths = is_array($paths) ? $paths : func_get_args();

    $success = true;

    foreach ($paths as $path) {
        try {
            if (! @unlink($path)) { # the error is here
                $success = false;
            }
        } catch (ErrorException $e) {
            $success = false;
        }
    }

    return $success;
}

I am confused. Why was the error not caught by the catch block? What type of error would not give a message to the error handler of laravel? Is there something I can do to get more information regarding the error?

This is our version of Laravel.

Laravel Framework version 5.1.45 (LTS)



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire