Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- improvement replace phpversion() by PHP_VERSION constant.
  • Loading branch information
uwetews committed May 27, 2017
1 parent 03e2a1c commit a6f3a51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions change_log.txt
Expand Up @@ -3,6 +3,8 @@
- bugfix change compiled code for registered function and modifiers to called as callable to allow closures
https://github.com/smarty-php/smarty/pull/368, https://github.com/smarty-php/smarty/issues/273
- bugfix https://github.com/smarty-php/smarty/pull/368 did break the default plugin handler
- improvement replace phpversion() by PHP_VERSION constant.
https://github.com/smarty-php/smarty/pull/363

21.5.2017
- performance store flag for already required shared plugin functions in static variable or
Expand Down
6 changes: 3 additions & 3 deletions libs/Autoloader.php
Expand Up @@ -14,13 +14,13 @@
* require_once '...path/Autoloader.php';
* Smarty_Autoloader::register();
* or
* include '...path/bootstarp.php';
* include '...path/bootstrap.php';
*
* $smarty = new Smarty();
*/
class Smarty_Autoloader
{
/**
/**
* Filepath to Smarty root
*
* @var string
Expand Down Expand Up @@ -76,7 +76,7 @@ public static function register($prepend = false)
self::$SMARTY_DIR = defined('SMARTY_DIR') ? SMARTY_DIR : dirname(__FILE__) . DIRECTORY_SEPARATOR;
self::$SMARTY_SYSPLUGINS_DIR = defined('SMARTY_SYSPLUGINS_DIR') ? SMARTY_SYSPLUGINS_DIR :
self::$SMARTY_DIR . 'sysplugins' . DIRECTORY_SEPARATOR;
if (version_compare(phpversion(), '5.3.0', '>=')) {
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
} else {
spl_autoload_register(array(__CLASS__, 'autoload'));
Expand Down
2 changes: 1 addition & 1 deletion libs/Smarty.class.php
Expand Up @@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.32-dev-10';
const SMARTY_VERSION = '3.1.32-dev-11';

/**
* define variable scopes
Expand Down

0 comments on commit a6f3a51

Please sign in to comment.