Deprecate stream variables (#933)

This commit is contained in:
Simon Wisselink
2024-03-25 13:45:04 +01:00
committed by GitHub
parent 7255b4d73c
commit 578c03efa5
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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) {