File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Symfony/Component/Validator/Constraints 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)
93
93
return ;
94
94
}
95
95
96
- $ host = substr ($ value , strrpos ($ value , '@ ' ) + 1 );
96
+ $ host = ( string ) substr ($ value , strrpos ($ value , '@ ' ) + 1 );
97
97
98
98
// Check for host DNS resource records
99
99
if ($ constraint ->checkMX ) {
@@ -138,7 +138,7 @@ public function validate($value, Constraint $constraint)
138
138
*/
139
139
private function checkMX ($ host )
140
140
{
141
- return ! empty ( $ host) && checkdnsrr ($ host , 'MX ' );
141
+ return '' !== $ host && checkdnsrr ($ host , 'MX ' );
142
142
}
143
143
144
144
/**
@@ -150,6 +150,6 @@ private function checkMX($host)
150
150
*/
151
151
private function checkHost ($ host )
152
152
{
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 ' )));
154
154
}
155
155
}
You can’t perform that action at this time.
0 commit comments