• Hello Slawek,

    I know it’s not an urgent problem, but I’d be happy if you could fix it.

    Greetings from Rzeszow / Hetmanska ;).

    [19-May-2023 19:39:21 UTC] PHP Deprecated:  Return type of PerfectWPWCO\Models\AbstractModel::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/domain.pl/public_html/wp-content/plugins/perfectwp-wc-omnibus/src/Models/AbstractModel.php on line 165
    [19-May-2023 19:39:21 UTC] PHP Deprecated:  Return type of PerfectWPWCO\Models\AbstractModel::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/domain.pl/public_html/wp-content/plugins/perfectwp-wc-omnibus/src/Models/AbstractModel.php on line 175
    [19-May-2023 19:39:21 UTC] PHP Deprecated:  Return type of PerfectWPWCO\Models\AbstractModel::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/domain.pl/public_html/wp-content/plugins/perfectwp-wc-omnibus/src/Models/AbstractModel.php on line 170
    [19-May-2023 19:39:21 UTC] PHP Deprecated:  Return type of PerfectWPWCO\Models\AbstractModel::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/domain.pl/public_html/wp-content/plugins/perfectwp-wc-omnibus/src/Models/AbstractModel.php on line 180
Viewing 1 replies (of 1 total)
  • Thread Starter BDR Bros.

    (@bdrbros)

    FIX:
    /src/Models/AbstractModel.php lines 165 – 183.

        public function offsetExists($offset): bool
        {
            return Arr::has($this->attributes, $offset);
        }
    
        public function offsetSet($offset, $value): void
        {
            Arr::set($this->attributes, $offset, $value);
        }
    
        public function offsetGet($offset): mixed
        {
            return Arr::get($this->attributes, $offset);
        }
    
        public function offsetUnset($offset): void
        {
            unset($this->attributes[$offset]);
        }
Viewing 1 replies (of 1 total)
  • The topic ‘PHP Deprecated (PHP 8.1)’ is closed to new replies.