File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public function validate($value, Constraint $constraint)
9393 return ;
9494 }
9595
96- $ host = substr ($ value , strrpos ($ value , '@ ' ) + 1 );
96+ $ host = ( string ) substr ($ value , strrpos ($ value , '@ ' ) + 1 );
9797
9898 // Check for host DNS resource records
9999 if ($ constraint ->checkMX ) {
@@ -138,7 +138,7 @@ public function validate($value, Constraint $constraint)
138138 */
139139 private function checkMX ($ host )
140140 {
141- return ! empty ( $ host) && checkdnsrr ($ host , 'MX ' );
141+ return '' !== $ host && checkdnsrr ($ host , 'MX ' );
142142 }
143143
144144 /**
@@ -150,6 +150,6 @@ private function checkMX($host)
150150 */
151151 private function checkHost ($ host )
152152 {
153- return ! empty ( $ host) && ($ this ->checkMX ($ host ) || (checkdnsrr ($ host , 'A ' ) || checkdnsrr ($ host , 'AAAA ' )));
153+ return '' !== $ host && ($ this ->checkMX ($ host ) || (checkdnsrr ($ host , 'A ' ) || checkdnsrr ($ host , 'AAAA ' )));
154154 }
155155}
You can’t perform that action at this time.
0 commit comments