getherbert / herbert

The WordPress Plugin Framework:
http://getherbert.com/
634 stars 95 forks source link

HEAD request is throwing error #187

Open moazam1 opened 6 years ago

moazam1 commented 6 years ago

I am getting following error whenever someone sends a HEAD request to our blog:

PHP WarningHEAD /oodle.xml Invalid argument supplied for foreach()

/vendor/getherbert/framework/Herbert/Framework/Router.php:98Herbert\Framework\Router::boot
add_rewrite_tag('%herbert_route%', '(.+)');

foreach ($this->routes[$this->http->method()] as $id => $route)
{
    $this->addRoute($route, $id, $this->http->method());
}