From 50b6c2b4256a671ba33add10f55b37952a63ee7f Mon Sep 17 00:00:00 2001 From: messju Date: Tue, 1 Jun 2004 16:46:43 +0000 Subject: [PATCH] fix: proper initialistaion of $content. thanks to Dmitry Koteroff for pointing this out. --- libs/plugins/function.fetch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/plugins/function.fetch.php b/libs/plugins/function.fetch.php index a3273a1e..17d4c997 100644 --- a/libs/plugins/function.fetch.php +++ b/libs/plugins/function.fetch.php @@ -26,6 +26,7 @@ function smarty_function_fetch($params, &$smarty) return; } + $content = ''; if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) { $_params = array('resource_type' => 'file', 'resource_name' => $params['file']); require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php'); @@ -171,7 +172,6 @@ function smarty_function_fetch($params, &$smarty) fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); } - $content = ''; fputs($fp, "\r\n"); while(!feof($fp)) { $content .= fgets($fp,4096);