Skip to content

Commit 3cf476d

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: [SecurityBundle] Authentication entry point is only registered with firewall exception listener, not with authentication listeners be smarter when guessing the document root Azerbaijani locale Fixed grammar error in docblock Adjust upgrade file rendering [Bridge/Propel1] Changed deps to accepts all upcoming propel1 versions compare version using PHP_VERSION_ID [Form] Add doc for FormEvents don't override internal PHP constants Conflicts: UPGRADE-3.0.md src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/HttpFoundation/Response.php
2 parents 0feb1d2 + 2afde20 commit 3cf476d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Fragment/HIncludeFragmentRenderer.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Fragment;
1313

14-
if (!defined('ENT_SUBSTITUTE')) {
15-
define('ENT_SUBSTITUTE', 8);
16-
}
17-
1814
use Symfony\Component\HttpFoundation\Request;
1915
use Symfony\Component\HttpFoundation\Response;
2016
use Symfony\Component\Templating\EngineInterface;
@@ -111,11 +107,16 @@ public function render($uri, Request $request, array $options = array())
111107
}
112108
$renderedAttributes = '';
113109
if (count($attributes) > 0) {
110+
if (PHP_VERSION_ID >= 50400) {
111+
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
112+
} else {
113+
$flags = ENT_QUOTES;
114+
}
114115
foreach ($attributes as $attribute => $value) {
115116
$renderedAttributes .= sprintf(
116117
' %s="%s"',
117-
htmlspecialchars($attribute, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset, false),
118-
htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset, false)
118+
htmlspecialchars($attribute, $flags, $this->charset, false),
119+
htmlspecialchars($value, $flags, $this->charset, false)
119120
);
120121
}
121122
}

Tests/Controller/ControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function testGetArguments()
181181
$request->attributes->set('foobar', 'foobar');
182182
$controller = array(new self(), 'controllerMethod3');
183183

184-
if (version_compare(PHP_VERSION, '5.3.16', '==')) {
184+
if (PHP_VERSION_ID === 50316) {
185185
$this->markTestSkipped('PHP 5.3.16 has a major bug in the Reflection sub-system');
186186
} else {
187187
try {

0 commit comments

Comments
 (0)