codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

Warning: Undefined array key 1, when calling Url::addQueryString() #174

Closed ameotoko closed 2 years ago

ameotoko commented 2 years ago

Calling Url::addQueryString() throws warning in PHP 8, if current URL does not have a query string:

Warning: Undefined array key 1

Happens here, because list() now throws warning instead of notice, if it receives an array with less elements than expected.

https://github.com/codefog/contao-haste/blob/a880f7655ee61232ed1b9dad25c3e5cafb6f5093/library/Haste/Util/Url.php#L138-L142