Laravel version update
Laravel version update
This commit is contained in:
@@ -95,7 +95,11 @@ class Escaper
|
||||
public function __construct($encoding = null)
|
||||
{
|
||||
if ($encoding !== null) {
|
||||
$encoding = (string) $encoding;
|
||||
if (! is_string($encoding)) {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
get_class($this) . ' constructor parameter must be a string, received ' . gettype($encoding)
|
||||
);
|
||||
}
|
||||
if ($encoding === '') {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
get_class($this) . ' constructor parameter does not allow a blank value'
|
||||
@@ -103,7 +107,7 @@ class Escaper
|
||||
}
|
||||
|
||||
$encoding = strtolower($encoding);
|
||||
if (!in_array($encoding, $this->supportedEncodings)) {
|
||||
if (! in_array($encoding, $this->supportedEncodings)) {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Value of \'' . $encoding . '\' passed to ' . get_class($this)
|
||||
. ' constructor parameter is invalid. Provide an encoding supported by htmlspecialchars()'
|
||||
@@ -321,7 +325,7 @@ class Escaper
|
||||
$result = $this->convertEncoding($string, 'UTF-8', $this->getEncoding());
|
||||
}
|
||||
|
||||
if (!$this->isUtf8($result)) {
|
||||
if (! $this->isUtf8($result)) {
|
||||
throw new Exception\RuntimeException(
|
||||
sprintf('String to be escaped was not valid UTF-8 or could not be converted: %s', $result)
|
||||
);
|
||||
|
Reference in New Issue
Block a user