Plugin Directory

Changeset 3327929


Ignore:
Timestamp:
07/15/2025 06:12:40 AM (9 months ago)
Author:
aweos
Message:

Version 1.9.4: Fix PHP 8+ deprecation warnings

  • Fix: PHP 8+ deprecation warnings in Zend DOM NodeList classes
  • Fix: libxml_disable_entity_loader() deprecation warnings
  • Update: Added proper return type declarations for Iterator, Countable, ArrayAccess interfaces
  • Compatibility: PHP 8.4 support added
  • Tested: All functionality preserved
Location:
aweos-google-maps-iframe-load-per-click
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • aweos-google-maps-iframe-load-per-click/tags/1.9.4/aweos-google-maps-iframe-load-per-click.php

    r3121142 r3327929  
    1111 * Plugin URI:  -
    1212 * Description: Google Maps can't be used directly anymore, this plugin asks for the users permission. It should work automatically.
    13  * Version:     1.9.3
     13 * Version:     1.9.4
    1414 * Author:      AWEOS GmbH
    1515 * Author URI:  https://aweos.de
     
    2020Google Maps can't be used directly anymore, this plugin asks for the users permission.
    2121This plugin helps with the GDPR for your website.
     22
     23Changelog:
     24= 1.9.4 =
     25* Fix: PHP 8+ deprecation warnings behoben
     26* Compatibility: PHP 8.4 Support hinzugefügt 
     27* Update: Zend DOM Library PHP 8+ kompatibel gemacht
    2228
    2329*/
  • aweos-google-maps-iframe-load-per-click/tags/1.9.4/vendor/zendframework/zend-dom/src/Document.php

    r1885462 r3327929  
    233233    {
    234234        libxml_use_internal_errors(true);
    235         libxml_disable_entity_loader(true);
     235        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     236        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     237            libxml_disable_entity_loader(true);
     238        }
    236239
    237240        $encoding  = $this->getEncoding();
     
    263266        }
    264267
    265         libxml_disable_entity_loader(false);
     268        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     269        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     270            libxml_disable_entity_loader(false);
     271        }
    266272        libxml_use_internal_errors(false);
    267273
  • aweos-google-maps-iframe-load-per-click/tags/1.9.4/vendor/zendframework/zend-dom/src/Document/NodeList.php

    r1885462 r3327929  
    4848     * @return DOMNode
    4949     */
    50     public function rewind()
     50    public function rewind(): void
    5151    {
    5252        $this->position = 0;
    53 
    54         return $this->list->item(0);
    5553    }
    5654
     
    6058     * @return bool
    6159     */
    62     public function valid()
     60    public function valid(): bool
    6361    {
    6462        return $this->offsetExists($this->position);
     
    7068     * @return DOMNode
    7169     */
    72     public function current()
     70    public function current(): mixed
    7371    {
    7472        return $this->list->item($this->position);
     
    8078     * @return int
    8179     */
    82     public function key()
     80    public function key(): mixed
    8381    {
    8482        return $this->position;
     
    9088     * @return DOMNode
    9189     */
    92     public function next()
     90    public function next(): void
    9391    {
    9492        ++$this->position;
    95 
    96         return $this->list->item($this->position);
    9793    }
    9894
     
    10298     * @return int
    10399     */
    104     public function count()
     100    public function count(): int
    105101    {
    106102        return $this->list->length;
     
    113109     * @return bool
    114110     */
    115     public function offsetExists($key)
     111    public function offsetExists(mixed $offset): bool
    116112    {
    117113        // DOMNodeList return `null` if item not exists.
    118         return (null !== $this->list->item($key));
     114        return (null !== $this->list->item($offset));
    119115    }
    120116
     
    125121     * @return mixed
    126122     */
    127     public function offsetGet($key)
     123    public function offsetGet(mixed $offset): mixed
    128124    {
    129         return $this->list->item($key);
     125        return $this->list->item($offset);
    130126    }
    131127
     
    137133     * @throws Exception\BadMethodCallException when attempting to write to a read-only item
    138134     */
    139     public function offsetSet($key, $value)
     135    public function offsetSet(mixed $offset, mixed $value): void
    140136    {
    141137        throw new Exception\BadMethodCallException('Attempting to write to a read-only list');
     
    148144     * @throws Exception\BadMethodCallException when attempting to unset a read-only item
    149145     */
    150     public function offsetUnset($key)
     146    public function offsetUnset(mixed $offset): void
    151147    {
    152148        throw new Exception\BadMethodCallException('Attempting to unset on a read-only list');
  • aweos-google-maps-iframe-load-per-click/tags/1.9.4/vendor/zendframework/zend-dom/src/NodeList.php

    r1885462 r3327929  
    125125     * @return DOMNode
    126126     */
    127     public function rewind()
     127    public function rewind(): void
    128128    {
    129129        $this->position = 0;
    130 
    131         return $this->nodeList->item(0);
    132130    }
    133131
     
    137135     * @return bool
    138136     */
    139     public function valid()
     137    public function valid(): bool
    140138    {
    141139        if (in_array($this->position, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
     
    151149     * @return DOMNode
    152150     */
    153     public function current()
     151    public function current(): mixed
    154152    {
    155153        return $this->nodeList->item($this->position);
     
    161159     * @return int
    162160     */
    163     public function key()
     161    public function key(): mixed
    164162    {
    165163        return $this->position;
     
    171169     * @return DOMNode
    172170     */
    173     public function next()
     171    public function next(): void
    174172    {
    175173        ++$this->position;
    176 
    177         return $this->nodeList->item($this->position);
    178174    }
    179175
     
    183179     * @return int
    184180     */
    185     public function count()
     181    public function count(): int
    186182    {
    187183        return $this->nodeList->length;
     
    194190     * @return bool
    195191     */
    196     public function offsetExists($key)
    197     {
    198         if (in_array($key, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
     192    public function offsetExists(mixed $offset): bool
     193    {
     194        if (in_array($offset, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
    199195            return true;
    200196        }
     
    208204     * @return mixed
    209205     */
    210     public function offsetGet($key)
    211     {
    212         return $this->nodeList->item($key);
     206    public function offsetGet(mixed $offset): mixed
     207    {
     208        return $this->nodeList->item($offset);
    213209    }
    214210
     
    220216     * @throws Exception\BadMethodCallException when attempting to write to a read-only item
    221217     */
    222     public function offsetSet($key, $value)
     218    public function offsetSet(mixed $offset, mixed $value): void
    223219    {
    224220        throw new Exception\BadMethodCallException('Attempting to write to a read-only list');
     
    231227     * @throws Exception\BadMethodCallException when attempting to unset a read-only item
    232228     */
    233     public function offsetUnset($key)
     229    public function offsetUnset(mixed $offset): void
    234230    {
    235231        throw new Exception\BadMethodCallException('Attempting to unset on a read-only list');
  • aweos-google-maps-iframe-load-per-click/tags/1.9.4/vendor/zendframework/zend-dom/src/Query.php

    r1885462 r3327929  
    234234        $encoding = $this->getEncoding();
    235235        libxml_use_internal_errors(true);
    236         libxml_disable_entity_loader(true);
     236        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     237        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     238            libxml_disable_entity_loader(true);
     239        }
    237240        if (null === $encoding) {
    238241            $domDoc = new DOMDocument('1.0');
     
    263266            libxml_clear_errors();
    264267        }
    265         libxml_disable_entity_loader(false);
     268        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     269        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     270            libxml_disable_entity_loader(false);
     271        }
    266272        libxml_use_internal_errors(false);
    267273
  • aweos-google-maps-iframe-load-per-click/trunk/aweos-google-maps-iframe-load-per-click.php

    r3121142 r3327929  
    1111 * Plugin URI:  -
    1212 * Description: Google Maps can't be used directly anymore, this plugin asks for the users permission. It should work automatically.
    13  * Version:     1.9.3
     13 * Version:     1.9.4
    1414 * Author:      AWEOS GmbH
    1515 * Author URI:  https://aweos.de
     
    2020Google Maps can't be used directly anymore, this plugin asks for the users permission.
    2121This plugin helps with the GDPR for your website.
     22
     23Changelog:
     24= 1.9.4 =
     25* Fix: PHP 8+ deprecation warnings behoben
     26* Compatibility: PHP 8.4 Support hinzugefügt 
     27* Update: Zend DOM Library PHP 8+ kompatibel gemacht
    2228
    2329*/
  • aweos-google-maps-iframe-load-per-click/trunk/vendor/zendframework/zend-dom/src/Document.php

    r1885462 r3327929  
    233233    {
    234234        libxml_use_internal_errors(true);
    235         libxml_disable_entity_loader(true);
     235        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     236        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     237            libxml_disable_entity_loader(true);
     238        }
    236239
    237240        $encoding  = $this->getEncoding();
     
    263266        }
    264267
    265         libxml_disable_entity_loader(false);
     268        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     269        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     270            libxml_disable_entity_loader(false);
     271        }
    266272        libxml_use_internal_errors(false);
    267273
  • aweos-google-maps-iframe-load-per-click/trunk/vendor/zendframework/zend-dom/src/Document/NodeList.php

    r1885462 r3327929  
    4848     * @return DOMNode
    4949     */
    50     public function rewind()
     50    public function rewind(): void
    5151    {
    5252        $this->position = 0;
    53 
    54         return $this->list->item(0);
    5553    }
    5654
     
    6058     * @return bool
    6159     */
    62     public function valid()
     60    public function valid(): bool
    6361    {
    6462        return $this->offsetExists($this->position);
     
    7068     * @return DOMNode
    7169     */
    72     public function current()
     70    public function current(): mixed
    7371    {
    7472        return $this->list->item($this->position);
     
    8078     * @return int
    8179     */
    82     public function key()
     80    public function key(): mixed
    8381    {
    8482        return $this->position;
     
    9088     * @return DOMNode
    9189     */
    92     public function next()
     90    public function next(): void
    9391    {
    9492        ++$this->position;
    95 
    96         return $this->list->item($this->position);
    9793    }
    9894
     
    10298     * @return int
    10399     */
    104     public function count()
     100    public function count(): int
    105101    {
    106102        return $this->list->length;
     
    113109     * @return bool
    114110     */
    115     public function offsetExists($key)
     111    public function offsetExists(mixed $offset): bool
    116112    {
    117113        // DOMNodeList return `null` if item not exists.
    118         return (null !== $this->list->item($key));
     114        return (null !== $this->list->item($offset));
    119115    }
    120116
     
    125121     * @return mixed
    126122     */
    127     public function offsetGet($key)
     123    public function offsetGet(mixed $offset): mixed
    128124    {
    129         return $this->list->item($key);
     125        return $this->list->item($offset);
    130126    }
    131127
     
    137133     * @throws Exception\BadMethodCallException when attempting to write to a read-only item
    138134     */
    139     public function offsetSet($key, $value)
     135    public function offsetSet(mixed $offset, mixed $value): void
    140136    {
    141137        throw new Exception\BadMethodCallException('Attempting to write to a read-only list');
     
    148144     * @throws Exception\BadMethodCallException when attempting to unset a read-only item
    149145     */
    150     public function offsetUnset($key)
     146    public function offsetUnset(mixed $offset): void
    151147    {
    152148        throw new Exception\BadMethodCallException('Attempting to unset on a read-only list');
  • aweos-google-maps-iframe-load-per-click/trunk/vendor/zendframework/zend-dom/src/NodeList.php

    r1885462 r3327929  
    125125     * @return DOMNode
    126126     */
    127     public function rewind()
     127    public function rewind(): void
    128128    {
    129129        $this->position = 0;
    130 
    131         return $this->nodeList->item(0);
    132130    }
    133131
     
    137135     * @return bool
    138136     */
    139     public function valid()
     137    public function valid(): bool
    140138    {
    141139        if (in_array($this->position, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
     
    151149     * @return DOMNode
    152150     */
    153     public function current()
     151    public function current(): mixed
    154152    {
    155153        return $this->nodeList->item($this->position);
     
    161159     * @return int
    162160     */
    163     public function key()
     161    public function key(): mixed
    164162    {
    165163        return $this->position;
     
    171169     * @return DOMNode
    172170     */
    173     public function next()
     171    public function next(): void
    174172    {
    175173        ++$this->position;
    176 
    177         return $this->nodeList->item($this->position);
    178174    }
    179175
     
    183179     * @return int
    184180     */
    185     public function count()
     181    public function count(): int
    186182    {
    187183        return $this->nodeList->length;
     
    194190     * @return bool
    195191     */
    196     public function offsetExists($key)
    197     {
    198         if (in_array($key, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
     192    public function offsetExists(mixed $offset): bool
     193    {
     194        if (in_array($offset, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
    199195            return true;
    200196        }
     
    208204     * @return mixed
    209205     */
    210     public function offsetGet($key)
    211     {
    212         return $this->nodeList->item($key);
     206    public function offsetGet(mixed $offset): mixed
     207    {
     208        return $this->nodeList->item($offset);
    213209    }
    214210
     
    220216     * @throws Exception\BadMethodCallException when attempting to write to a read-only item
    221217     */
    222     public function offsetSet($key, $value)
     218    public function offsetSet(mixed $offset, mixed $value): void
    223219    {
    224220        throw new Exception\BadMethodCallException('Attempting to write to a read-only list');
     
    231227     * @throws Exception\BadMethodCallException when attempting to unset a read-only item
    232228     */
    233     public function offsetUnset($key)
     229    public function offsetUnset(mixed $offset): void
    234230    {
    235231        throw new Exception\BadMethodCallException('Attempting to unset on a read-only list');
  • aweos-google-maps-iframe-load-per-click/trunk/vendor/zendframework/zend-dom/src/Query.php

    r1885462 r3327929  
    234234        $encoding = $this->getEncoding();
    235235        libxml_use_internal_errors(true);
    236         libxml_disable_entity_loader(true);
     236        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     237        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     238            libxml_disable_entity_loader(true);
     239        }
    237240        if (null === $encoding) {
    238241            $domDoc = new DOMDocument('1.0');
     
    263266            libxml_clear_errors();
    264267        }
    265         libxml_disable_entity_loader(false);
     268        // libxml_disable_entity_loader ist deprecated in PHP 8.0+ und wirkungslos in PHP 8.3+
     269        if (LIBXML_VERSION < 20900 && function_exists('libxml_disable_entity_loader')) {
     270            libxml_disable_entity_loader(false);
     271        }
    266272        libxml_use_internal_errors(false);
    267273
Note: See TracChangeset for help on using the changeset viewer.