Fixed IPv6 requirement check

Closes #16035
This commit is contained in:
SilverFire - Dmitry Naumenko
2018-04-29 11:15:45 +03:00
parent 19b076d3fe
commit 9bf11efedf

View File

@ -106,7 +106,7 @@ return array(
array(
'name' => 'IPv6 support',
'mandatory' => false,
'condition' => defined('AF_INET6'),
'condition' => strlen(@inet_pton('2001:db8::1')) === 16,
'by' => 'IPv6 expansion in <a href="http://www.yiiframework.com/doc-2.0/yii-validators-ipvalidator.html">IpValidator</a>',
'memo' => 'When <a href="http://www.yiiframework.com/doc-2.0/yii-validators-ipvalidator.html#$expandIPv6-detail">IpValidator::expandIPv6</a>
property is set to <code>true</code>, PHP must support IPv6 protocol stack. Currently PHP constant <code>AF_INET6</code> is not defined