fixed php condition check