LaravelCollective / html

HTML and Form Builders for the Laravel Framework
MIT License
3.99k stars 782 forks source link

Function strftime() is deprecated #710

Open pixieaka opened 2 years ago

pixieaka commented 2 years ago

Laravel Framework: 9.13.0 PHP: 8.1.6

laravel.WARNING: Function strftime() is deprecated

laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [deprecations] is not defined

fulopattila122 commented 2 years ago

Where do you get this error message? What part of this package is causing it?

jamesj2 commented 2 years ago

Where do you get this error message? What part of this package is causing it?

src/FormBuilder.php @ line 721

    public function selectMonth($name, $selected = null, $options = [], $format = '%B')
    {
        $months = [];

        foreach (range(1, 12) as $month) {
            $months[$month] = strftime($format, mktime(0, 0, 0, $month, 1));
        }

        return $this->select($name, $months, $selected, $options);
    }
fulopattila122 commented 2 years ago

There's an open PR to fix this: #699

themuddfamily commented 1 year ago

I have pushed a fix for this on my fork of this package as it is now abandoned: https://github.com/LaravelLux/html