whitecube / nova-page

Static pages content management for Laravel Nova
https://whitecube.github.io/nova-page
MIT License
238 stars 41 forks source link

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

Closed ssang closed 3 years ago

ssang commented 3 years ago

/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);
    }
}
amidesfahani commented 3 years ago

error still exists! any updates?

toonvandenbos commented 3 years ago

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