Support » Alpha/Beta/RC » looks like a bug…

  • … this line in functions-formatting.php:
    elseif (strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd' || strstr($curl, '<style') || strstr($curl, '<script')))

    is it a typo or i just misunderstand something?

Viewing 4 replies - 1 through 4 (of 4 total)
  • It’s not a bug. It’s looking for a match.

    but why there is no brace after strstr($curl, '<kbd'?
    strstr is (string,string) function, not (string,bool) so i’m surprised

    Because it only searches for something that starts with “<kbd” in the variable $curl. If found, the string starting from ‘<kbd to the end of $curl will be returned.

    As i understand, here we try to catch “<kbd” tag. So our function have to return something eq to true on “<kbd foobar”, is it?

    strstr($curl,'<kbd') works like this, but strstr($curl,'<kbd' || ... is not.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘looks like a bug…’ is closed to new replies.