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

PHP 8 error "Required parameter $closure follows optional parameter $date" #76

Closed
ssang opened this issue Jan 14, 2021 · 2 comments · Fixed by #78
Closed

PHP 8 error "Required parameter $closure follows optional parameter $date" #76

ssang opened this issue Jan 14, 2021 · 2 comments · Fixed by #78

Comments

@ssang
Copy link

ssang commented Jan 14, 2021

/src/Pages/Template.php:359

public function setDateIf($moment, $date = null, Closure $closure)
{
    if (!($date instanceof Carbon)) {
        $date = new Carbon($date);
    }

    if ($closure($date, $this->getDate($moment))) {
        return $this->setDate($moment, $date);
    }
}
martijngastkemper added a commit to martijngastkemper/nova-page that referenced this issue Jan 20, 2021
Required parameter $closure follows optional parameter $date

fixes whitecube#76
martijngastkemper added a commit to martijngastkemper/nova-page that referenced this issue Jan 20, 2021
Required parameter $closure follows optional parameter $date

fixes whitecube#76
@amidesfahani
Copy link

error still exists! any updates?

@toonvandenbos
Copy link
Member

Hi, sorry for the delay. I just merged @martijngastkemper's PR which should fix this issue. Released under v0.2.6.

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 a pull request may close this issue.

3 participants