Fixed auto-link failure due to unexpected Zend_Http_Response::getHeaders() response

Xon

Well-known member
This URL http://archive.airforcetimes.com/article/20081119/NEWS/811190308/JDAM-makes-debut-10C-Thunderbolt fails despite having the relevant data:
Code:
<title>JDAM makes debut on A-10C Thunderbolt | Air Force Times | airforcetimes.com</title>
<meta property="og:title" content="JDAM makes debut on A-10C Thunderbolt">

Stack trace:
Code:
ErrorException: Error linking URL 'http://archive.airforcetimes.com/article/20081119/NEWS/811190308/JDAM-makes-debut-10C-Thunderbolt': explode() expects parameter 2 to be string, array given - library/XenForo/BbCode/Formatter/BbCode/AutoLink.php:346 
Generated By: XXXXX, Today at 3:30 PM
#0 [internal function]: XenForo_Application::handlePhpError(2, 'explode() expec...', '/var/www/html...', 346, Array)
#1 /var/www/html/library/XenForo/BbCode/Formatter/BbCode/AutoLink.php(346): explode(';', Array, 2)
#2 /var/www/html/library/XenForo/BbCode/Formatter/BbCode/AutoLink.php(246): XenForo_BbCode_Formatter_BbCode_AutoLink->_getUrlTitle('http://archive....')
#3 /var/www/html/library/XenForo/BbCode/Formatter/BbCode/AutoLink.php(193): XenForo_BbCode_Formatter_BbCode_AutoLink->_autoLinkUrl('http://archive....')
...

The relevant line in XenForo_BbCode_Formatter_BbCode_AutoLink::_getUrlTitle():
Code:
$parts = explode(';', $headers['Content-type'], 2);

The contents of $headers['Content-type'] is an array rather than the expected string.
 
I've fixed this now, thanks. That said, this link still doesn't tend to work for me locally as it times out before completing, but that may not happen on a proper server connection.
 
Top Bottom