YOURLS-AuthMgrPlus
YOURLS-AuthMgrPlus copied to clipboard
Add proper bracing around if-clause
php is not Python, and the indentation is meaningless for code-blocks...
thus the snippet
if ($foo)
foreach ($x as $a => $b)
if ($yikes)
doit;
elseif ($bar)
somethingelse;
really does:
if ($foo) {
foreach ($x as $a => $b) {
if ($yikes) {
doit;
} elseif ($bar) {
somethingelse;
}
}
}
whereas what we want is:
if ($foo) {
foreach ($x as $a => $b) {
if ($yikes) {
doit;
}
}
} elseif ($bar) {
somethingelse;
}
this was a regression introduced with ff31aff5c2418277fd0c40bf87cb0ee44ef02249
Closes: https://github.com/joshp23/YOURLS-AuthMgrPlus/issues/55
I have also been bitten by this
This is also a duplicate of https://github.com/joshp23/YOURLS-AuthMgrPlus/pull/59
Please merge one of those PRs 🙏
Gosh, what an easy fix for such an annoying bug. Yes, please merge one of those.