11

I found this weird line in a library while debugging, though I really don't know php that well but wouldn't this condition return a boolean anyway?

Comments
  • 1
  • 3
    There is a true in quotes
  • 5
    Scroll down a little bit on the code and see how the function was exited...
  • 4
    Lol.

    Since this clearly isn't your code I don't mind saying I stopped reading after a glance at that code. Need some meatballs with this spaghetti.
  • 2
    @craig939393 I was unsure about the first but the second was a bummer! Pure macaroni.
  • 1
    Looks like code written by a noob.
  • 3
    That inconsistent indentations in both of the images are triggering me 😬
  • 2
    Also that comment //create a new object
    You don‘t say?!
  • 1
    One can use the result of the x==y expression instead of the ternary ? true : false there however the x == 'true' needs to stay

    Also as a side note: one should use === instead of == to compare value AND type
Add Comment