Skip to content

Commit 8e0a8b5

Browse files
Merge branch '2.3' into 2.6
* 2.3: Changed visibility of setUp() and tearDown to protected fixed XSS in the exception handler Php Inspections (EA Extended) - static code analysis includes: [2.3] Remove most refs uses Test with local components instead of waiting for the subtree-splitter when possible Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Component/Config/Util/XmlUtils.php src/Symfony/Component/Console/Helper/ProgressHelper.php src/Symfony/Component/Debug/ExceptionHandler.php src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php src/Symfony/Component/Filesystem/Tests/FilesystemTest.php src/Symfony/Component/OptionsResolver/Options.php src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php src/Symfony/Component/Yaml/Inline.php
2 parents 73827d4 + 20a9126 commit 8e0a8b5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Tests/ConfigCacheTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ConfigCacheTest extends \PHPUnit_Framework_TestCase
2222

2323
private $metaFile = null;
2424

25-
public function setUp()
25+
protected function setUp()
2626
{
2727
$this->resourceFile = tempnam(sys_get_temp_dir(), '_resource');
2828
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
@@ -32,7 +32,7 @@ public function setUp()
3232
$this->generateMetaFile();
3333
}
3434

35-
public function tearDown()
35+
protected function tearDown()
3636
{
3737
$files = array($this->cacheFile, $this->metaFile, $this->resourceFile);
3838

Util/XmlUtils.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,24 +191,24 @@ public static function phpize($value)
191191
return;
192192
case ctype_digit($value):
193193
$raw = $value;
194-
$cast = intval($value);
194+
$cast = (int) $value;
195195

196-
return '0' == $value[0] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw);
196+
return '0' == $value[0] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw);
197197
case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)):
198198
$raw = $value;
199199
$cast = intval($value);
200200

201-
return '0' == $value[1] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw);
201+
return '0' == $value[1] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw);
202202
case 'true' === $lowercaseValue:
203203
return true;
204204
case 'false' === $lowercaseValue:
205205
return false;
206206
case isset($value[1]) && '0b' == $value[0].$value[1]:
207207
return bindec($value);
208208
case is_numeric($value):
209-
return '0x' == $value[0].$value[1] ? hexdec($value) : floatval($value);
209+
return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value;
210210
case preg_match('/^(-|\+)?[0-9]+(\.[0-9]+)?$/', $value):
211-
return floatval($value);
211+
return (float) $value;
212212
default:
213213
return $value;
214214
}

0 commit comments

Comments
 (0)