mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
fix: proper initialistaion of $content.
thanks to Dmitry Koteroff for pointing this out.
This commit is contained in:
@@ -26,6 +26,7 @@ function smarty_function_fetch($params, &$smarty)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content = '';
|
||||||
if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
|
if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
|
||||||
$_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
|
$_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
|
||||||
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php');
|
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");
|
fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = '';
|
|
||||||
fputs($fp, "\r\n");
|
fputs($fp, "\r\n");
|
||||||
while(!feof($fp)) {
|
while(!feof($fp)) {
|
||||||
$content .= fgets($fp,4096);
|
$content .= fgets($fp,4096);
|
||||||
|
Reference in New Issue
Block a user