What's the logic flaw in this conditional?
        Posted  
        
            by Scott B
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Scott B
        
        
        
        Published on 2010-04-01T18:22:16Z
        Indexed on 
            2010/04/01
            18:33 UTC
        
        
        Read the original article
        Hit count: 190
        
php
I've created this code branch so that if the permalink settings do no match at least one of the OR conditions, I can execute the "do something" branch. However, I believe there is a flaw in the logic, since I've set permalinks to /%postname%.html and it still tries echo's true;
I believe I need to change the ORs to AND, right?
if (get_option('permalink_structure') !== "/%postname%/" || 
          get_option('my_permalinks') !== "/%postname%/" || 
    get_option('permalink_structure') !== "/%postname%.html" || 
          get_option('my_permalinks') !== "/%postname%.html"))
{
//do something
    echo "true";
}
© Stack Overflow or respective owner