Deleted unnecessary piece of code #10

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

This piece of code will never happen

Deleted unnecessary piece of code
This piece of code will never happen
Owner

vrana commented Apr 30, 2012

It happens at the end of the query.

@vrana vrana closed this Apr 30, 2012

I think that this mistake could be simplified to

$true = true;
if (!$true) {
   //$true is falsy
} else {
    //$true is not falsy, which means that the next line will fail (evaluate to false)
    if (!$true) {
       //this will never happen
    } 
}  

Am I completely wrong?

Owner

vrana commented May 2, 2012

(!$found && $fp && !feof($fp)) is not the same as (!$found && rtrim($query) == "").

Damn I feel stupid, didn't look at the rest of if statement. Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment