mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
- bugfix fopen() error handling at stream resources
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
|
14/05/2011
|
||||||
|
- bugfix fopen() 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
|
||||||
|
|
||||||
|
@@ -74,13 +74,15 @@ class Smarty_Internal_Resource_Stream {
|
|||||||
{
|
{
|
||||||
// return template string
|
// return template string
|
||||||
$_template->template_source = '';
|
$_template->template_source = '';
|
||||||
$fp = fopen(str_replace(':', '://', $_template->template_resource),'r+');
|
if ($fp = fopen(str_replace(':', '://', $_template->template_resource),'r+')) {
|
||||||
while (!feof($fp)) {
|
while (!feof($fp)) {
|
||||||
$_template->template_source .= fgets($fp);
|
$_template->template_source .= fgets($fp);
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user