mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix compatibility with PHP 5.2
This commit is contained in:
parent
005a7d841d
commit
c5092851d1
2 changed files with 2 additions and 3 deletions
|
@ -342,7 +342,6 @@ class SecurityTest extends CakeTestCase {
|
|||
Security::encrypt($txt, $key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test that short keys cause errors
|
||||
*
|
||||
|
|
|
@ -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.'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue