Fixes #4497: Bad Request, Unable to verify your data submission

This commit is contained in:
mbman
2014-07-30 09:37:03 +02:00
parent 49ff98938b
commit 94dc27a30e
2 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ Yii Framework 2 Change Log
- Bug #4453: `yii message/extract` wasn't properly writing to po files in case of multiple categories (samdark) - Bug #4453: `yii message/extract` wasn't properly writing to po files in case of multiple categories (samdark)
- Bug #4469: Make `Security::compareString()` timing depend only on length of `$actual` input and add unit test. (tom--) - Bug #4469: Make `Security::compareString()` timing depend only on length of `$actual` input and add unit test. (tom--)
- Bug #4470: Avoid endless loop when exporting logs with low values of flushInterval and eportInterval (cebe) - Bug #4470: Avoid endless loop when exporting logs with low values of flushInterval and eportInterval (cebe)
- Bug #4497: Fixed StringHelper::byteSubstr() returning empty string on null $length param (mbman)
- Bug #4514: Fixed Request class crashing when empty CSRF token value is sent in cookie (cebe) - Bug #4514: Fixed Request class crashing when empty CSRF token value is sent in cookie (cebe)
- Bug #4519: `yii\base\Model::isAttributeRequired()` should check if the `when` option of the validator is set (thiagotalma) - Bug #4519: `yii\base\Model::isAttributeRequired()` should check if the `when` option of the validator is set (thiagotalma)
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) - Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)

View File

@ -40,7 +40,7 @@ class BaseStringHelper
*/ */
public static function byteSubstr($string, $start, $length) public static function byteSubstr($string, $start, $length)
{ {
return mb_substr($string, $start, $length, '8bit'); return mb_substr($string, $start, $length ?: mb_strlen($string), '8bit');
} }
/** /**