This commit is contained in:
Fabien Potencier 2013-05-06 08:26:30 +02:00
parent 616e0ac2f9
commit e0d2065344

View File

@ -74,13 +74,8 @@ class Crawler extends \SplObjectStorage
$this->addNodes($node);
} elseif (is_string($node)) {
$this->addContent($node);
} elseif ($node !== null) {
throw new \InvalidArgumentException(
sprintf(
'Expecting node to be DOMNodeList|DOMNode|array|string|null, but got %s',
(is_object($node)) ? get_class($node) : gettype($node)
)
);
} elseif (null !== $node) {
throw new \InvalidArgumentException(sprintf('Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "%s".', is_object($node) ? get_class($node) : gettype($node)));
}
}