mirror of
https://github.com/smarty-php/smarty.git
synced 2025-07-29 15:37:14 +02:00
Deprecate stream variables (#933)
This commit is contained in:
@ -10,4 +10,7 @@ template.
|
||||
{$foo:bar}
|
||||
```
|
||||
|
||||
NB. Support for using streams to call variables is deprecated since Smarty v5.1 and will be removed
|
||||
in a future version.
|
||||
|
||||
See also [`Template Resources`](../resources.md)
|
||||
|
@ -555,6 +555,9 @@ class Template extends TemplateBase {
|
||||
*/
|
||||
public function getStreamVariable($variable)
|
||||
{
|
||||
|
||||
trigger_error("Using stream variables (\`\{\$foo:bar\}\`)is deprecated.", E_USER_DEPRECATED);
|
||||
|
||||
$_result = '';
|
||||
$fp = fopen($variable, 'r+');
|
||||
if ($fp) {
|
||||
|
Reference in New Issue
Block a user