Closed vbrandl closed 4 weeks ago
What exactly do you mean? What "gibberish" don't you understand and which part of my proposed change is "no good"?
I did my best to be clear and improve this project. I opened an issue with a reproducible bug, then did local tests to see where the bug originates and fixed the bug so the image behaves as documented.
Maybe this testcase helps clear things up:
<?php
$foo = getenv('FOO');
$old_result = (strtolower($foo) === 'false' || $foo == false) ? false : true;
echo 'Old Result: ';
var_dump($old_result);
$new_result = strtolower($foo) !== 'false';
echo 'New Result: ';
var_dump($new_result);
# no environment variable, expected result: `true`
$ php test.php
Old Result: bool(false)
New Result: bool(true)
# environment variable set to `false`, expected result: `false`
$ FOO=fAlse php test.php
Old Result: bool(false)
New Result: bool(false)
# environment variable set to `true`, expected result: `true`
$ FOO=true php test.php
Old Result: bool(true)
New Result: bool(true)
# environment variable set but neither `true` nor `false`, expected result: `true`
$ FOO=invalid php test.php
Old Result: bool(true)
New Result: bool(true)
This shows, that the old logic does not work as documented (e.g. default to true
) when the environment variable is not set at all. This conflicts with the documented behavior, which states, that the value should default to true
.
Ah yes sorry for da thang, it seems it is a legit bug fix, but submit it to mail, in PR they dont merge, i dunno why but you have to send the fix via mail
How do I submit my PR via mail? Or do you mean that my commit message has to contain Signed-off-by: Author Name <authoremail@example.com>
as stated in the failed CI action?
I will update the commit message and push again soon
They dont accept pr's thru the PR, you must send them the changes via mail, understand?
Related: #1948
I just pushed again with proper Signed-off-by
in my commit message.
Also sorry for feeding the troll... I fell for them, but reported the account to Github.
Thanks!
According to the documentation, both
OBJECTSTORE_S3_SSL
andOBJECTSTORE_S3_AUTOCREATE
should default totrue
. Currently, when these environment variables are not set, they default tofalse
. (Closes https://github.com/nextcloud/docker/issues/2308).This fix works, because
strtolower(false)
returns the empty string. So whenOBJECTSTORE_S3_SSL
is not set andgetenv('OBJECTSTORE_S3_SSL')
returnsfalse
, the checkstrtolower($use_ssl) !== 'false'
will evaluate totrue
.With this fix, both values will be
true
if they arefalse
when converted to lowercaseThis should now match the documented behavior.