Uh oh!
There was an error while loading. Please reload this page.
Correctly handle emtpy string in proxyuserpwd config - #16644
Conversation
rullzer
left a comment
There was a problem hiding this comment.
This is cleaner IMO. since it sets the correct default
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kesselb
commented
Aug 6, 2019
server/tests/lib/Http/Client/ClientTest.php Lines 56 to 65 in effca30 @rullzer do you know why these tests are not failing? |
rullzer
commented
Aug 6, 2019
I think because null is not matched exactly in the with statement... |
ChristophWurst
left a comment
There was a problem hiding this comment.
empty might also have done the trick but this is fine :)
Thanks a lot!
ChristophWurst
commented
Aug 7, 2019
one could then try $this->config ->expects($this->at(1)) ->method('getSystemValue') ->with($this->equalTo('proxyuserpwd'), $this->equalTo(null)) ->willReturn(null); That might help in case phpunit filters out empty args. |
rullzer
commented
Aug 11, 2019
Ah my bad. pushed wrong. let me create a proper branch. |
As documented, the default value for config value proxyuserpwd is ''.
However, that value results in the error:
"cURL error 5: Unsupported proxy syntax in '@'".
This patch handles the values of '' and null (the default in the code)
the same for config values proxyuserpwd and proxy.
Signed-off-by: Scott Shambarger devel@shambarger.net