Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepareSrcForThumb fix #43

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open

prepareSrcForThumb fix #43

wants to merge 1 commit into from

Conversation

wax100
Copy link

@wax100 wax100 commented Aug 5, 2021

What does it do?

Fix prepareSrcForThumb function. First check if src contain HTTP(S). If yes - return full url, if not - continue checking

Why is it needed?

Because right now first run checking, that check if file exist in filesystem.

try {
                if (!$this->filesystem->has($src)) {
                    return '';
                }
            } catch (Exception $e) {
                return '';
            }

But we check NOT file, but URL.
if (substr($src,0,4) != 'http') {
So first we should check file it is or url.

BEFORE
Screenshot_2

AFTER
Screenshot_5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant