Commit cb7921b8 by ekerazha

Fix StringHelper::substr() call.

parent 6dc69e68
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment