? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
24 Dec 2021

Ensure that if there is no browserVersion then we do not run null through str_replace

Code review

Screenshot 2021-12-24 at 18 55 26

avatar PhilETaylor PhilETaylor - open - 24 Dec 2021
avatar PhilETaylor PhilETaylor - change - 24 Dec 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Dec 2021
Category Libraries
avatar wilsonge
wilsonge - comment - 29 Dec 2021

Is this a 'real world' problem? Or something limited to PHPUnit runs - where we should just mock things better. Asking because if there's no version presumably there's no user agent either and we're just md5'ing the base url of the site here and not getting a unique hash ever (unsure what the implications are of that without starting to deep dive)

I mean I'm sure this solves the immediate problem - just wondering if this has unmasked a rabbit hole

avatar PhilETaylor
PhilETaylor - comment - 29 Dec 2021

you should never be trying to push NULL through str_replace regardless of where its run :)

avatar PhilETaylor
PhilETaylor - comment - 29 Dec 2021

just wondering if this has unmasked a rabbit hole

Welcome to the PHP 8.1+ party :)

avatar alikon
alikon - comment - 29 Dec 2021

got this deprecation notice as well on J.4 too

avatar alikon alikon - test_item - 29 Dec 2021 - Tested successfully
avatar alikon
alikon - comment - 29 Dec 2021

I have tested this item successfully on 728e5e0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36400.

avatar wilsonge
wilsonge - comment - 30 Dec 2021

got this deprecation notice as well on J.4 too

Where? This is the string used for the name of all the cookies. If it's not unique it starts to get concerning.

avatar PhilETaylor
PhilETaylor - comment - 30 Dec 2021

I only noticed it on phpunit runs.

avatar PhilETaylor PhilETaylor - change - 30 Dec 2021
Labels Added: ? ?
avatar PhilETaylor
PhilETaylor - comment - 1 Jan 2022

build now passing.

avatar Fedik
Fedik - comment - 2 Jan 2022

I think the fix is valid, the issue may happen when WebClient::detectBrowser fail to detect the browser and so version.
Can happen due many reasons, as UserAgent string is not strict and can be anything.

avatar Fedik
Fedik - comment - 2 Jan 2022

I have tested this item successfully on 7a9a870


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36400.

avatar Fedik Fedik - test_item - 2 Jan 2022 - Tested successfully
avatar zero-24
zero-24 - comment - 5 Jan 2022

Will merge this for now but I would say that complete method does not make sense to me but looks like I'm the only one here :)

avatar zero-24 zero-24 - change - 5 Jan 2022
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-05 19:37:13
Closed_By zero-24
avatar zero-24 zero-24 - close - 5 Jan 2022
avatar zero-24 zero-24 - merge - 5 Jan 2022

Add a Comment

Login with GitHub to post a comment