Setter validation
Opened this issue · 1 comments
Deleted user commented
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 "&&"?
vernes commented
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))