From c5092851d1e0caa960aa324cebac6405be946179 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 27 Aug 2013 21:51:40 -0400 Subject: [PATCH] Fix compatibility with PHP 5.2 --- lib/Cake/Test/Case/Utility/SecurityTest.php | 1 - lib/Cake/Utility/Security.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/SecurityTest.php b/lib/Cake/Test/Case/Utility/SecurityTest.php index 3f31219bd..07afdc09c 100644 --- a/lib/Cake/Test/Case/Utility/SecurityTest.php +++ b/lib/Cake/Test/Case/Utility/SecurityTest.php @@ -342,7 +342,6 @@ class SecurityTest extends CakeTestCase { Security::encrypt($txt, $key); } - /** * Test that short keys cause errors * diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index cc47db7c1..8a5cc1f3c 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -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.')); }