Skip to content

Commit

Permalink
Merge pull request #359 from seamuslee001/smarty_2_6_32
Browse files Browse the repository at this point in the history
[REF] Upgrade Smarty to 2.6.32
  • Loading branch information
demeritcowboy authored Jan 16, 2023
2 parents 18915b5 + 6672e68 commit 9833ec8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion Smarty/Config_File.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* [email protected]
*
* @link http://www.smarty.net/
* @version 2.6.25-dev
* @copyright Copyright: 2001-2005 New Digital Group, Inc.
* @author Andrei Zmievski <[email protected]>
* @access public
Expand Down
5 changes: 2 additions & 3 deletions Smarty/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <[email protected]>
* @package Smarty
* @version 2.6.31-dev
*/

/* $Id$ */
Expand Down Expand Up @@ -466,7 +465,7 @@ class Smarty
*
* @var string
*/
var $_version = '2.6.31';
var $_version = '2.6.32';

/**
* current template inclusion depth
Expand Down Expand Up @@ -1212,7 +1211,7 @@ function fetch($resource_name, $cache_id = null, $compile_id = null, $display =
$_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
$_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
$_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
if (@count($this->_cache_info['insert_tags']) == 0
if (empty($this->_cache_info['insert_tags'])
&& !$this->_cache_serials
&& $_gmt_mtime == $_last_modified_date) {
if (php_sapi_name()=='cgi')
Expand Down
3 changes: 1 addition & 2 deletions Smarty/Smarty_Compiler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* @link http://smarty.php.net/
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <[email protected]>
* @version 2.6.25-dev
* @copyright 2001-2005 New Digital Group, Inc.
* @package Smarty
*/
Expand Down Expand Up @@ -1192,7 +1191,7 @@ function _compile_foreach_start($tag_args)
}

$output = '<?php ';
$output .= "\$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array'); }";
$output .= "\$_from = $from; if ((\$_from instanceof StdClass) || (!is_array(\$_from) && !is_object(\$_from))) { settype(\$_from, 'array'); }";
if (isset($name)) {
$foreach_props = "\$this->_foreach[$name]";
$output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n";
Expand Down

0 comments on commit 9833ec8

Please sign in to comment.