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

JsonLd isEmpty method does not check for empty Url #244

Closed
rajakhoury opened this issue Mar 25, 2021 · 0 comments
Closed

JsonLd isEmpty method does not check for empty Url #244

rajakhoury opened this issue Mar 25, 2021 · 0 comments

Comments

@rajakhoury
Copy link
Contributor

I think this is a typo but the method has an undefined variable $url

public function isEmpty()
{
    return empty($this->values)
        && empty($this->type)
        && empty($this->title)
        && empty($this->description)
        && empty($url) // should be $this->url
        && empty($this->images);
}

also the test pass when it shouldn't:

public function test_is_empty()
{
    // make default json-ld data as empty on create
    config()->set('seotools.json-ld.defaults',[]);
    $this->jsonLd = new JsonLd();
    $this->jsonLd->setUrl('http://domain.com');

    $this->assertTrue($this->jsonLd->isEmpty());
}
vinicius73 added a commit that referenced this issue May 3, 2021
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

No branches or pull requests

1 participant