Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper bracing around if-clause #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

umlaeute
Copy link

@umlaeute umlaeute commented Feb 14, 2023

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 ff31aff

Closes: #55

php is not Python, and the indentation is meaningless for code-blocks.

Closes: joshp23#55
UTCWebDev pushed a commit to UTCGilligan/utctiny that referenced this pull request Nov 17, 2023
Signed-off-by: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com>

- joshp23/YOURLS-AuthMgrPlus#56
@Lucas-C
Copy link

Lucas-C commented Dec 2, 2024

I have also been bitten by this

This is also a duplicate of #59

Please fix on of those PRs 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Administrators" are not allowed to manage plugins...
2 participants