fatal errors after updating to 2.0.17

Started by phoxim, November 22, 2020, 09:47:43 AM

Previous topic - Next topic

phoxim

hi there,
after updating the forum to 2.0.17 two different fatal errors occur when trying to read some posts.

forum url: www.sfmforum.de

fatal errors:
Fatal error: Call to undefined function get_proxied_url() in /www/htdocs/v078724/forum/Sources/Load.php on line 1056
http://www.phoxim.de/forum/index.php?topic=33297.0
and
Fatal error: Call to undefined function get_proxied_url() in /www/htdocs/v078724/forum/Sources/Subs.php on line 1289
http://www.phoxim.de/forum/index.php?topic=41863.0

any suggestions please
wolfgang


German Science Fiction Modeling Forum with SMF 2.0.18

vbgamer45

Looks like you are missing this function from the end of your Sources/Subs.php file

/**
* Gets the appropriate URL to use for images (or whatever) when using SSL
*
* The returned URL may or may not be a proxied URL, depending on the situation.
* Mods can implement alternative proxies using the 'integrate_proxy' hook.
*
* @param string $url The original URL of the requested resource
* @return string The URL to use
*/
function get_proxied_url($url)
{
global $boardurl, $image_proxy_enabled, $image_proxy_secret, $user_info;

// Only use the proxy if enabled, and never for robots
if (empty($image_proxy_enabled) || !empty($user_info['possibly_robot']))
return $url;

$parsedurl = parse_url($url);

// Don't bother with HTTPS URLs, schemeless URLs, or obviously invalid URLs
if (empty($parsedurl['scheme']) || empty($parsedurl['host']) || empty($parsedurl['path']) || $parsedurl['scheme'] === 'https')
return $url;

// We don't need to proxy our own resources
if ($parsedurl['host'] === parse_url($boardurl, PHP_URL_HOST))
return strtr($url, array('http://' => 'https://'));

// By default, use SMF's own image proxy script
$proxied_url = strtr($boardurl, array('http://' => 'https://')) . '/proxy.php?request=' . urlencode($url) . '&hash=' . hash_hmac('sha1', $url, $image_proxy_secret);

// Allow mods to easily implement an alternative proxy
call_integration_hook('integrate_proxy', array($url, &$proxied_url));

return $proxied_url;
}
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

phoxim

hey superhero  8)
that worked pretty well ! thank you very much  ;)
wolfgang
German Science Fiction Modeling Forum with SMF 2.0.18

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: