changed the way we check for HHVM
authorFabien Potencier <fabien.potencier@gmail.com>
Mon, 4 Aug 2014 19:55:24 +0000 (21:55 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Mon, 4 Aug 2014 19:55:24 +0000 (21:55 +0200)
lib/Twig/Extension/Core.php

index 3092eb8..ef36576 100644 (file)
@@ -944,7 +944,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
             static $htmlspecialcharsCharsets;
 
             if (null === $htmlspecialcharsCharsets) {
-                if ('hiphop' === substr(PHP_VERSION, -6)) {
+                if (defined('HHVM_VERSION')) {
                     $htmlspecialcharsCharsets = array('utf-8' => true, 'UTF-8' => true);
                 } else {
                     $htmlspecialcharsCharsets = array(