ErrorException using readlink()

Posted 9 months ago by Tetravalence

Hello, I have an ErrorException that I'd like to handle when readlink() returns false.

public static function validateLink()
{
        $public_resources = public_path().
            '/vendor/'.static::getVendor().'/assets';

        return readlink($public_resources) ?
            $public_resources : false;
}

The failure is an expected behavior so I need the script continues to run after ternary operator. How should I proceed from there?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.