[2.3] Static Code Analysis for Components
This commit is contained in:
parent
e020f749f0
commit
d05cffb409
@ -123,8 +123,9 @@ class Response
|
||||
*/
|
||||
public function getHeader($header, $first = true)
|
||||
{
|
||||
$normalizedHeader = str_replace('-', '_', strtolower($header));
|
||||
foreach ($this->headers as $key => $value) {
|
||||
if (str_replace('-', '_', strtolower($key)) == str_replace('-', '_', strtolower($header))) {
|
||||
if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) {
|
||||
if ($first) {
|
||||
return is_array($value) ? (count($value) ? $value[0] : '') : $value;
|
||||
}
|
||||
|
@ -785,7 +785,6 @@ QUERY;
|
||||
{
|
||||
$sids = new \SplObjectStorage();
|
||||
$classIds = new \SplObjectStorage();
|
||||
$currentIds = array();
|
||||
foreach ($changes[1] as $field => $new) {
|
||||
for ($i = 0, $c = count($new); $i<$c; $i++) {
|
||||
$ace = $new[$i];
|
||||
@ -813,8 +812,6 @@ QUERY;
|
||||
$aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id');
|
||||
$aceIdProperty->setAccessible(true);
|
||||
$aceIdProperty->setValue($ace, (int) $aceId);
|
||||
} else {
|
||||
$currentIds[$ace->getId()] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user