Problem description:
When parsing a x.0.0.0 network address, in example 240.0.0.0/4, calling Network::moveTo() causes an exception.
Steps to reproduce:
- Create a network using
Network::parse, ie.: $network = Network::parse('240.0.0.0/4');
- Call
moveTo with a higher prefix length, ie.: $network->moveTo(5);
Desired result:
An array with two Networks should be returned.
Actual result:
In most cases, a IpException is thrown with the following message: "Invalid IP address format"
Additional info:
This behaviour can be observed for most x.0.0.0 networks, especially with a prefix length smaller than 8. Attached you will find my test script, detailing the failings: iptools_network_test.zip
Problem description:
When parsing a x.0.0.0 network address, in example 240.0.0.0/4, calling
Network::moveTo()causes an exception.Steps to reproduce:
Network::parse, ie.:$network = Network::parse('240.0.0.0/4');moveTowith a higher prefix length, ie.:$network->moveTo(5);Desired result:
An array with two
Networksshould be returned.Actual result:
In most cases, a
IpExceptionis thrown with the following message: "Invalid IP address format"Additional info:
This behaviour can be observed for most x.0.0.0 networks, especially with a prefix length smaller than 8. Attached you will find my test script, detailing the failings: iptools_network_test.zip