From cb7921b8a5ecd391076f869fd344b78f789adf70 Mon Sep 17 00:00:00 2001 From: ekerazha Date: Sun, 29 Sep 2013 17:59:31 +0200 Subject: [PATCH] Fix StringHelper::substr() call. --- framework/yii/helpers/BaseSecurity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/yii/helpers/BaseSecurity.php b/framework/yii/helpers/BaseSecurity.php index 41caade..ca42d37 100644 --- a/framework/yii/helpers/BaseSecurity.php +++ b/framework/yii/helpers/BaseSecurity.php @@ -104,10 +104,10 @@ class BaseSecurity */ protected static function stripPadding($data) { - $end = StringHelper::substr($data, -1); + $end = StringHelper::substr($data, -1, NULL); $last = ord($end); $n = StringHelper::strlen($data) - $last; - if (StringHelper::substr($data, $n) == str_repeat($end, $last)) { + if (StringHelper::substr($data, $n, NULL) == str_repeat($end, $last)) { return StringHelper::substr($data, 0, $n); } return false;