From c9652ffaaadb7cb01eef8d02be84fd123f655a57 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 6 Aug 2006 18:00:49 +0000 Subject: [PATCH] Adding PHP5 constant ((bool)phpversion() > 5) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3371 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/bootstrap.php | 3 +++ cake/libs/overloadable.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cake/bootstrap.php b/cake/bootstrap.php index 0a19a3d29..e3550f72f 100644 --- a/cake/bootstrap.php +++ b/cake/bootstrap.php @@ -26,6 +26,9 @@ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ +if (!defined('PHP5')) { + define ('PHP5', (bool)phpversion() > 5); +} /** * Configuration, directory layout and standard libraries */ diff --git a/cake/libs/overloadable.php b/cake/libs/overloadable.php index f2d28c557..51967f448 100644 --- a/cake/libs/overloadable.php +++ b/cake/libs/overloadable.php @@ -35,7 +35,7 @@ * Load the interface class based on the version of PHP. * */ -if (phpversion() < 5) { +if (PHP5) { require(LIBS . 'overloadable_php4.php'); } else { require(LIBS . 'overloadable_php5.php');