Fix compatibility with PHP 5.2

This commit is contained in:
mark_story 2013-08-27 21:51:40 -04:00
parent 005a7d841d
commit c5092851d1
2 changed files with 2 additions and 3 deletions

View file

@ -342,7 +342,6 @@ class SecurityTest extends CakeTestCase {
Security::encrypt($txt, $key);
}
/**
* Test that short keys cause errors
*

View file

@ -302,7 +302,7 @@ class Security {
* @throws CakeException On invalid data or key.
*/
public static function encrypt($plain, $key) {
static::_checkKey($key, 'encrypt()');
self::_checkKey($key, 'encrypt()');
if (empty($plain)) {
throw new CakeException(__d('cake_dev', 'The data to encrypt cannot be empty.'));
}
@ -338,7 +338,7 @@ class Security {
* @throws CakeException On invalid data or key.
*/
public static function decrypt($cipher, $key) {
static::_checkKey($key, 'decrypt()');
self::_checkKey($key, 'decrypt()');
if (empty($cipher)) {
throw new CakeException(__d('cake_dev', 'The data to decrypt cannot be empty.'));
}