Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -82,7 +82,7 @@ class Csrf extends AbstractValidator
$options = ArrayUtils::iteratorToArray($options);
}
if (!is_array($options)) {
if (! is_array($options)) {
$options = (array) $options;
}
@@ -116,7 +116,11 @@ class Csrf extends AbstractValidator
*/
public function isValid($value, $context = null)
{
$this->setValue((string) $value);
if (! is_string($value)) {
return false;
}
$this->setValue($value);
$tokenId = $this->getTokenIdFromHash($value);
$hash = $this->getValidationToken($tokenId);
@@ -124,7 +128,7 @@ class Csrf extends AbstractValidator
$tokenFromValue = $this->getTokenFromHash($value);
$tokenFromHash = $this->getTokenFromHash($hash);
if (!$tokenFromValue || !$tokenFromHash || ($tokenFromValue !== $tokenFromHash)) {
if (! $tokenFromValue || ! $tokenFromHash || ($tokenFromValue !== $tokenFromHash)) {
$this->error(self::NOT_SAME);
return false;
}