Skip to content

Commit dd12118

Browse files
authored
Update EmailAddress.php
[Exception] Deprecated Functionality: explode(): Passing null to parameter magento#2 ($string) of type string is deprecated in /var/www/html/lib/internal/Magento/Framewo rk/Validator/EmailAddress.php on line 68
1 parent fa21fcf commit dd12118

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/Magento/Framework/Validator/EmailAddress.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ public function setValidateTld(bool $shouldValidate)
6464
*/
6565
public function isValid($value)
6666
{
67-
$bannedHostsConfig = $this->scopeConfig->getValue('customer/email_validation/banned_hosts');
68-
$bannedHosts = array_map('trim', explode("\n", $bannedHostsConfig));
67+
$bannedHostsConfig = $this->scopeConfig->getValue('customer/email_validation/banned_hosts', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
68+
69+
$bannedHosts = array_map('trim', explode("\n", (string) $bannedHostsConfig));
6970

7071
$hostname = explode('@', $value)[1] ?? '';
7172
if (in_array($hostname, $bannedHosts, true)) {

0 commit comments

Comments
 (0)