Changeset 487 for trunk/lib/App.inc.php
- Timestamp:
- Aug 20, 2014 11:56:27 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r484 r487 42 42 class App { 43 43 44 // Minimum version of PHP required for this version of the Codebase. 45 const CODEBASE_MIN_PHP_VERSION = '5.3.0'; 46 44 47 // A place to keep an object instance for the singleton pattern. 45 48 protected static $instance = null; … … 179 182 $this->timer = new ScriptTimer(); 180 183 $this->timer->start('_app'); 181 182 // The codebase now requires a minimum PHP version.183 $codebase_minimum_php_version = '5.3.0';184 if (version_compare(PHP_VERSION, $codebase_minimum_php_version, '<')) {185 $this->logMsg(sprintf('Codebase minimum PHP version of %s not satisfied (you have %s). ', $codebase_minimum_php_version, phpversion()), LOG_NOTICE, __FILE__, __LINE__);186 }187 184 } 188 185 … … 382 379 // Set the version of the codebase we're using. 383 380 $codebase_version_file = dirname(__FILE__) . '/../docs/version.txt'; 381 $codebase_version = ''; 384 382 if (is_readable($codebase_version_file)) { 385 383 $codebase_version = trim(file_get_contents($codebase_version_file)); … … 388 386 header('X-Codebase-Version: ' . $codebase_version); 389 387 } 388 } 389 390 if (version_compare(PHP_VERSION, self::CODEBASE_MIN_PHP_VERSION, '<')) { 391 $this->logMsg(sprintf('PHP %s required for Codebase %s, using %s; some things will break.', self::CODEBASE_MIN_PHP_VERSION, $codebase_version, PHP_VERSION), LOG_NOTICE, __FILE__, __LINE__); 390 392 } 391 393
Note: See TracChangeset
for help on using the changeset viewer.