- improvement replace phpversion() by PHP_VERSION constant.

https://github.com/smarty-php/smarty/pull/363
This commit is contained in:
uwetews
2017-05-27 14:37:35 +02:00
parent 03e2a1c8a2
commit a6f3a518e1
3 changed files with 6 additions and 4 deletions

View File

@@ -3,6 +3,8 @@
- bugfix change compiled code for registered function and modifiers to called as callable to allow closures - 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 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 - 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 21.5.2017
- performance store flag for already required shared plugin functions in static variable or - performance store flag for already required shared plugin functions in static variable or

View File

@@ -14,13 +14,13 @@
* require_once '...path/Autoloader.php'; * require_once '...path/Autoloader.php';
* Smarty_Autoloader::register(); * Smarty_Autoloader::register();
* or * or
* include '...path/bootstarp.php'; * include '...path/bootstrap.php';
* *
* $smarty = new Smarty(); * $smarty = new Smarty();
*/ */
class Smarty_Autoloader class Smarty_Autoloader
{ {
/** /**
* Filepath to Smarty root * Filepath to Smarty root
* *
* @var string * @var string
@@ -76,7 +76,7 @@ class Smarty_Autoloader
self::$SMARTY_DIR = defined('SMARTY_DIR') ? SMARTY_DIR : dirname(__FILE__) . DIRECTORY_SEPARATOR; 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_SYSPLUGINS_DIR = defined('SMARTY_SYSPLUGINS_DIR') ? SMARTY_SYSPLUGINS_DIR :
self::$SMARTY_DIR . 'sysplugins' . DIRECTORY_SEPARATOR; 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); spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
} else { } else {
spl_autoload_register(array(__CLASS__, 'autoload')); spl_autoload_register(array(__CLASS__, 'autoload'));

View File

@@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.32-dev-10'; const SMARTY_VERSION = '3.1.32-dev-11';
/** /**
* define variable scopes * define variable scopes