mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
- bugfix error handling at stream resources
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
14/05/2011
|
14/05/2011
|
||||||
- bugfix fopen() error handling at stream resources
|
- bugfix error handling at stream resources
|
||||||
|
|
||||||
13/05/2011
|
13/05/2011
|
||||||
- bugfix condition starting with "-" did fail at {if} and {while} tags
|
- bugfix condition starting with "-" did fail at {if} and {while} tags
|
||||||
|
@@ -329,8 +329,8 @@ class Smarty_Internal_Data {
|
|||||||
{
|
{
|
||||||
$_result = '';
|
$_result = '';
|
||||||
if ($fp = fopen($variable, 'r+')) {
|
if ($fp = fopen($variable, 'r+')) {
|
||||||
while (!feof($fp)) {
|
while (!feof($fp) && ($current_line = fgets($fp)) !== false ) {
|
||||||
$_result .= fgets($fp);
|
$_result .= $current_line;
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
return $_result;
|
return $_result;
|
||||||
|
@@ -75,8 +75,8 @@ class Smarty_Internal_Resource_Stream {
|
|||||||
// return template string
|
// return template string
|
||||||
$_template->template_source = '';
|
$_template->template_source = '';
|
||||||
if ($fp = fopen(str_replace(':', '://', $_template->template_resource),'r+')) {
|
if ($fp = fopen(str_replace(':', '://', $_template->template_resource),'r+')) {
|
||||||
while (!feof($fp)) {
|
while (!feof($fp) && ($current_line = fgets($fp)) !== false ) {
|
||||||
$_template->template_source .= fgets($fp);
|
$_template->template_source .= $current_line;
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user