PandaHugMonster / php-simputils

Framework that provides tools for developers and software architects to improve their performance, analyze code easier and improving overall experience with PHP.
MIT License
3 stars 0 forks source link

Bug of `PHP::currentUrl()` that returns always the same object #132

Closed PandaHugMonster closed 1 year ago

PandaHugMonster commented 1 year ago

The initial approach to current-url logic was poorly designed. The returned instance of UrlObject was always the same object, and this object can be modified anywhere (accidentally and on purpose), what causes the wrong url generations on the page. To avoid this issue, the new instance must be returned on every call, so each call the new object of URL is created.