mirror of
https://github.com/filp/whoops.git
synced 2026-08-30 20:17:11 +00:00
TemplateHelper: improve invalid utf8 handling in hhvm
This commit is contained in:
@@ -27,7 +27,9 @@ class TemplateHelper
|
||||
{
|
||||
$flags = ENT_QUOTES;
|
||||
|
||||
if (defined("ENT_SUBSTITUTE")) {
|
||||
// HHVM has all constants defined, but only ENT_IGNORE
|
||||
// works at the moment
|
||||
if (defined("ENT_SUBSTITUTE") && !defined("HHVM_VERSION")) {
|
||||
$flags |= ENT_SUBSTITUTE;
|
||||
} else {
|
||||
// This is for 5.3.
|
||||
|
||||
@@ -39,10 +39,6 @@ class TemplateHelperTest extends TestCase
|
||||
|
||||
public function testEscapeBrokenUtf8()
|
||||
{
|
||||
if (defined('HHVM_VERSION')) {
|
||||
return $this->markTestSkipped();
|
||||
}
|
||||
|
||||
// The following includes an illegal utf-8 sequence to test.
|
||||
// Encoded in base64 to survive possible encoding changes of this file.
|
||||
$original = base64_decode('VGhpcyBpcyBhbiBpbGxlZ2FsIHV0Zi04IHNlcXVlbmNlOiDD');
|
||||
|
||||
Reference in New Issue
Block a user