[DomCrawler] lowered parsed protocol string (fixes #6986)

This commit is contained in:
Johannes Klauss 2013-02-19 18:21:02 +01:00
parent d41fc8bb2d
commit cb0307474e

View File

@ -46,7 +46,7 @@ class Link
*/
public function __construct(\DOMNode $node, $currentUri, $method = 'GET')
{
if (!in_array(substr($currentUri, 0, 4), array('http', 'file'))) {
if (!in_array(strtolower(substr($currentUri, 0, 4)), array('http', 'file'))) {
throw new \InvalidArgumentException(sprintf('Current URI must be an absolute URL ("%s").', $currentUri));
}