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

Debian : Auto-Upgrading PHP8.3 - Increment on type bool has no effect, this will change in the next major version of PHP #582

Open
Gauthier-L opened this issue Feb 12, 2024 · 1 comment

Comments

@Gauthier-L
Copy link

Hi all !

Just for your information. Debian upgrade PHP-FPM to the newest version 8.3. The syslog return this warning :
PHP Warning: Increment on type bool has no effect, this will change in the next major version of PHP in /var/www/html/fog/lib/fog/fogbase.class.php on line 974

Best regards

@Gauthier-L
Copy link
Author

I publish my edit for this :

Original on line 974 :

    protected function isLoaded($key)
    {
        $key = $this->key($key);
        $result = isset($this->isLoaded[$key]) ? $this->isLoaded[$key] : 0;
        $this->isLoaded[$key] = true;
        ++$this->isLoaded[$key];

        return $result ? $result : false;
    }

I've replace by this :

        protected function isLoaded($key)
        {
            $key = $this->key($key);

            if (!isset($this->isLoaded[$key])) {
                $this->isLoaded[$key] = 1; // Initialiser à 1 s'il n'est pas défini
            } else {
                ++$this->isLoaded[$key]; // Incrémenter si déjà défini
            }

            return $this->isLoaded[$key] > 1; // Retourner true si déjà chargé au moins une fois
        }

All it's okey for me. You can try in dev branch.

Best regards

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