Skip to content

Commit 70b3b57

Browse files
committed
Fix some bugs with new PHP versions
Looks like the validatorIp got some problem related to some PHP versions. According to 3v4l.org behavior are quite different for reserved IPv4 224.0.0.0/4 https://3v4l.org/cAdWZ Instead of keeping the failing test while PHP fix the problem, I've switched to 240.0.0.1 IP which is working. I've also submitted a bug to PHP to see what could be wrong with 224.0.0.0 IPs. https://bugs.php.net/bug.php?id=73653
1 parent a82ef81 commit 70b3b57

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ php:
1414
matrix:
1515
fast_finish: true
1616
allow_failures:
17-
- php: 7.1
1817
- php: hhvm
1918
- php: nightly
2019

lib/plugin/sfPearFrontendPlugin.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the symfony package.
55
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
6-
*
6+
*
77
* For the full copyright and license information, please view the LICENSE
88
* file that was distributed with this source code.
99
*/
@@ -46,7 +46,7 @@ public function _display($text)
4646

4747
protected function splitLongLine($text)
4848
{
49-
$lines = '';
49+
$lines = array();
5050
foreach (explode("\n", $text) as $longline)
5151
{
5252
foreach (explode("\n", wordwrap($longline, 62)) as $line)

test/unit/validator/sfValidatorIpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
$invalidReservedV4Ips = array(
4343
'0.0.0.0',
44-
'224.0.0.1',
44+
'240.0.0.1',
4545
'255.255.255.255'
4646
);
4747

0 commit comments

Comments
 (0)