artesaos / seotools

SEO Tools for Laravel
MIT License
3.07k stars 503 forks source link

Breaking Change from v0.15.0 #183

Closed slavarazum closed 4 years ago

slavarazum commented 4 years ago

What steps will reproduce the problem?

By default, OpenGraph url set to false in config file. When I set a custom url by OpenGraph::setUrl('https://some.url') it doesn't reflect, open graph url will not render due to this PR - https://github.com/artesaos/seotools/pull/148 It works only if you set default config value to null instead of false.

What is the expected result?

Ability to set custom open graph url regardless of default url value

What do you get instead?

Ability to set custom open graph url only if change a default config value to null

Additional info

Q A
This Package Version 0.15.0+
Laravel Framework Version 5.8+
PHP version 7.3
Operating system MacOS

I think condition on this row should be:

 elseif ($key == 'url' && !$value)

or

 elseif ($key == 'url' && empty($value))

I have tried to fix it, but I have many failures in different tests when I download repository. Haven't idea how it passes on Travis:

screenshot

I have this result on fresh checkout to v0.16.0, without any changes

vinicius73 commented 4 years ago

Closed by #192