Fix for 'Undefined index: content_type'
authorRoland Häder <roland@mxchange.org>
Sun, 22 Nov 2009 19:46:06 +0000 (19:46 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Nov 2009 19:46:06 +0000 (19:46 +0000)
view.php

index 1bfd84b..92d3a58 100644 (file)
--- a/view.php
+++ b/view.php
@@ -60,11 +60,8 @@ if (((isGetRequestElementSet('user')) || (isGetRequestElementSet('reseller'))) &
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1",
                        array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__);
 
-               // Extract type (last 3 chars should be okay)
-               $type = substr($url, -3);
-
                // Set header and ...
-               sendHeader('Content-Type: image/' . $type);
+               setContentType('image/' . substr($url, -3, 3));
 
                // Redirect
                redirectToUrl($url, false);