From f8717a6cf70170b83f7f8034eb8ade4faaf5f952 Mon Sep 17 00:00:00 2001 From: carpii Date: Fri, 14 Jun 2019 20:44:58 +0700 Subject: [PATCH] allow StdClass to be cast to array when compiling foreach, to prevent invalid count warning in PHP 7.2+ --- libs/Smarty_Compiler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 904601d7..ac8549f9 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1192,7 +1192,7 @@ class Smarty_Compiler extends Smarty { } $output = '_foreach[$name]"; $output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n";