Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Might be fixing #1536 (I don't know for sure).
Issue #1536 is caused by Laravel trying to invoke the method
cacheBusting
on the wrong class. Laravel wrongly uses\App\Assets\Helpers
instead of\App\Facades\Helpers
.I don't know why this happens, because I cannot reproduce it. The methods is called from within the Blade template
Lychee/resources/views/gallery.blade.php
Line 7 in 61b93a6
And the Blade template is called in
Lychee/app/Http/Controllers/IndexController.php
Line 94 in 61b93a6
Neither the Blade template nor the class
IndexController
explicitly import the class\App\Facades\Helpers
. Hence the Laravel auto-loader should kick in. (I have told you how much I hate this "magic", haven't I?) and resolve the class\App\Facades\Helpers
. But for some reason we end up with\App\Assets\Helpers
. The only plausible explanation which I can conjuncture is that somehow the (wrong) class\App\Assets\Helpers
gets loaded first. Hence, I looked around where this class is loaded explicitly, found a single occurrence and fixed that.I don't know, if this PR will really fix the bug. It is more like an educated guess. However, this PR shouldn't do any harm either.