Skip to content
This repository
Browse code

MINOR Removed PHP 5.1 check for PasswordEncryptor, use hash() always …

…as PHP 5.1 is no longer supported.
  • Loading branch information...
commit b92e4e01a95b131cf255a05f33eb2330f03d7654 1 parent fec5497
Sean Harvey authored March 27, 2012

Showing 1 changed file with 1 addition and 7 deletions. Show diff stats Hide diff stats

  1. 8  security/PasswordEncryptor.php
8  security/PasswordEncryptor.php
@@ -139,13 +139,7 @@ function getAlgorithm() {
139 139
 	}
140 140
 	
141 141
 	function encrypt($password, $salt = null, $member = null) {
142  
-		if(function_exists('hash')) {
143  
-			// Available in PHP 5.1+ only
144  
-			return hash($this->algorithm, $password . $salt);
145  
-		} else {
146  
-			// Fallback to global built-in methods
147  
-			return call_user_func($this->algorithm, $password . $salt);
148  
-		}
  142
+		return hash($this->algorithm, $password . $salt);
149 143
 	}
150 144
 }
151 145
 

0 notes on commit b92e4e0

Please sign in to comment.
Something went wrong with that request. Please try again.