Closed ghost closed 10 years ago
Condition: !is_string($path) && !preg_match("/[a-z0-9.]/i",$path) Second part never be fulfilled, because if variable is not string, what will work with a regular expression.
May be better set "||" instead of "&&"?
Well, $path must be string AND only some character are allowed. I could write it also as: !(is_string($path) || preg_match("/[a-z0-9.]/i",$path))
Condition: !is_string($path) && !preg_match("/[a-z0-9.]/i",$path) Second part never be fulfilled, because if variable is not string, what will work with a regular expression.
May be better set "||" instead of "&&"?