Fixed missing favicon creates errors?

Nicky Vermeersch

Active member
After a brand new installation of Xenforo 1.2, I noticed you get server errors when there is a missing favicon?

Code:
Server Error Log
Error Info
ErrorException: Argument 2 passed to XenForo_Application::mapMerge() must be an array, boolean given, called in /usr/share/nginx/html/library/XenForo/Dependencies/Public.php on line 309 and defined - library/XenForo/Application.php:1081
Generated By: Unknown Account, 1 minute ago
Stack Trace
#0 /usr/share/nginx/html/library/XenForo/Application.php(1081): XenForo_Application::handlePhpError(4096, 'Argument 2 pass...', '/usr/share/ngin...', 1081, Array)
#1 /usr/share/nginx/html/library/XenForo/Dependencies/Public.php(309): XenForo_Application::mapMerge(Array, false)
#2 /usr/share/nginx/html/library/XenForo/FrontController.php(551): XenForo_Dependencies_Public->preRenderView(Object(XenForo_ControllerResponse_Error))
#3 /usr/share/nginx/html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#4 /usr/share/nginx/html/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
  ["url"] => string(31) "http://78.47.78.158/favicon.ico"
  ["_GET"] => array(2) {
    ["/favicon_ico"] => string(0) ""
    ["args"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
This might have been generated during the install? Otherwise, it seems to indicate that there's no style proper style cache and any page would generate it. Rebuilding the master data would fix it.

I suppose that we could suppress error logging during the install.

I should note that the default .htaccess doesn't rewrite the favicon URL (you can see http://xenforo.com/community/favicon.ico), so I think this might only be something that happens where the .htaccess doesn't work (needs RewriteBase, nginx, IIS, etc).
 
Back
Top Bottom