mirror of
https://github.com/smarty-php/smarty.git
synced 2025-07-30 07:57:14 +02:00
Deprecate stream variables (#933)
This commit is contained in:
@ -10,4 +10,7 @@ template.
|
|||||||
{$foo:bar}
|
{$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)
|
See also [`Template Resources`](../resources.md)
|
||||||
|
@ -555,6 +555,9 @@ class Template extends TemplateBase {
|
|||||||
*/
|
*/
|
||||||
public function getStreamVariable($variable)
|
public function getStreamVariable($variable)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
trigger_error("Using stream variables (\`\{\$foo:bar\}\`)is deprecated.", E_USER_DEPRECATED);
|
||||||
|
|
||||||
$_result = '';
|
$_result = '';
|
||||||
$fp = fopen($variable, 'r+');
|
$fp = fopen($variable, 'r+');
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
Reference in New Issue
Block a user