vernes/YiiMailer

Setter validation

Opened this issue · 1 comments

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))