Laravel version update
Laravel version update
This commit is contained in:
2
vendor/symfony/polyfill-php56/LICENSE
vendored
2
vendor/symfony/polyfill-php56/LICENSE
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014-2016 Fabien Potencier
|
||||
Copyright (c) 2015-2018 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
27
vendor/symfony/polyfill-php56/Php56.php
vendored
27
vendor/symfony/polyfill-php56/Php56.php
vendored
@@ -23,13 +23,13 @@ final class Php56
|
||||
|
||||
public static function hash_equals($knownString, $userInput)
|
||||
{
|
||||
if (!is_string($knownString)) {
|
||||
if (!\is_string($knownString)) {
|
||||
trigger_error('Expected known_string to be a string, '.gettype($knownString).' given', E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_string($userInput)) {
|
||||
if (!\is_string($userInput)) {
|
||||
trigger_error('Expected user_input to be a string, '.gettype($userInput).' given', E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
@@ -45,7 +45,7 @@ final class Php56
|
||||
$result = 0;
|
||||
|
||||
for ($i = 0; $i < $knownLen; ++$i) {
|
||||
$result |= ord($knownString[$i]) ^ ord($userInput[$i]);
|
||||
$result |= \ord($knownString[$i]) ^ \ord($userInput[$i]);
|
||||
}
|
||||
|
||||
return 0 === $result;
|
||||
@@ -74,22 +74,22 @@ final class Php56
|
||||
if (null === $charMaps) {
|
||||
$charMaps = array(
|
||||
self::LDAP_ESCAPE_FILTER => array('\\', '*', '(', ')', "\x00"),
|
||||
self::LDAP_ESCAPE_DN => array('\\', ',', '=', '+', '<', '>', ';', '"', '#'),
|
||||
self::LDAP_ESCAPE_DN => array('\\', ',', '=', '+', '<', '>', ';', '"', '#', "\r"),
|
||||
);
|
||||
|
||||
$charMaps[0] = array();
|
||||
|
||||
for ($i = 0; $i < 256; ++$i) {
|
||||
$charMaps[0][chr($i)] = sprintf('\\%02x', $i);
|
||||
$charMaps[0][\chr($i)] = sprintf('\\%02x', $i);
|
||||
}
|
||||
|
||||
for ($i = 0, $l = count($charMaps[self::LDAP_ESCAPE_FILTER]); $i < $l; ++$i) {
|
||||
for ($i = 0, $l = \count($charMaps[self::LDAP_ESCAPE_FILTER]); $i < $l; ++$i) {
|
||||
$chr = $charMaps[self::LDAP_ESCAPE_FILTER][$i];
|
||||
unset($charMaps[self::LDAP_ESCAPE_FILTER][$i]);
|
||||
$charMaps[self::LDAP_ESCAPE_FILTER][$chr] = $charMaps[0][$chr];
|
||||
}
|
||||
|
||||
for ($i = 0, $l = count($charMaps[self::LDAP_ESCAPE_DN]); $i < $l; ++$i) {
|
||||
for ($i = 0, $l = \count($charMaps[self::LDAP_ESCAPE_DN]); $i < $l; ++$i) {
|
||||
$chr = $charMaps[self::LDAP_ESCAPE_DN][$i];
|
||||
unset($charMaps[self::LDAP_ESCAPE_DN][$i]);
|
||||
$charMaps[self::LDAP_ESCAPE_DN][$chr] = $charMaps[0][$chr];
|
||||
@@ -115,13 +115,24 @@ final class Php56
|
||||
// Remove any chars to ignore from the list
|
||||
$ignore = (string) $ignore;
|
||||
|
||||
for ($i = 0, $l = strlen($ignore); $i < $l; ++$i) {
|
||||
for ($i = 0, $l = \strlen($ignore); $i < $l; ++$i) {
|
||||
unset($charMap[$ignore[$i]]);
|
||||
}
|
||||
|
||||
// Do the main replacement
|
||||
$result = strtr($subject, $charMap);
|
||||
|
||||
// Encode leading/trailing spaces if self::LDAP_ESCAPE_DN is passed
|
||||
if ($flags & self::LDAP_ESCAPE_DN) {
|
||||
if ($result[0] === ' ') {
|
||||
$result = '\\20'.substr($result, 1);
|
||||
}
|
||||
|
||||
if ($result[\strlen($result) - 1] === ' ') {
|
||||
$result = substr($result, 0, -1).'\\20';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
2
vendor/symfony/polyfill-php56/composer.json
vendored
2
vendor/symfony/polyfill-php56/composer.json
vendored
@@ -26,7 +26,7 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2-dev"
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user