Merge pull request #274 from halkyon/cleanup

Removing old code that supported PHP 5.1
This commit is contained in:
Ingo Schommer 2012-03-27 01:05:49 -07:00
commit 3808cb198f
2 changed files with 1 additions and 20 deletions

View File

@ -40,19 +40,6 @@
if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT)); if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT));
else error_reporting(E_ALL); else error_reporting(E_ALL);
/*
* This is for versions of PHP prior to version 5.2
* Creating this here will allow both web requests and cron jobs to inherit it.
*/
if (!function_exists('array_fill_keys')) {
function array_fill_keys($keys,$value) {
//Sometimes we get passed an empty array, and if that's the case, you'll get an error message
if(sizeof($keys)==0)
return Array();
else
return array_combine($keys,array_fill(0,count($keys),$value));
}
}
/** /**
* Include _ss_environment.php files * Include _ss_environment.php files

View File

@ -139,13 +139,7 @@ class PasswordEncryptor_PHPHash extends PasswordEncryptor {
} }
function encrypt($password, $salt = null, $member = null) { function encrypt($password, $salt = null, $member = null) {
if(function_exists('hash')) {
// Available in PHP 5.1+ only
return hash($this->algorithm, $password . $salt); return hash($this->algorithm, $password . $salt);
} else {
// Fallback to global built-in methods
return call_user_func($this->algorithm, $password . $salt);
}
} }
} }