diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index fce15dd7d..426b6407a 100644 --- a/lib/Twig/Compiler.php +++ b/lib/Twig/Compiler.php @@ -180,17 +180,7 @@ class Twig_Compiler if ($node->getTemplateLine() != $this->lastLine) { $this->write(sprintf("// line %d\n", $node->getTemplateLine())); - // when mbstring.func_overload is set to 2 - // mb_substr_count() replaces substr_count() - // but they have different signatures! - if (((int) ini_get('mbstring.func_overload')) & 2) { - @trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', E_USER_DEPRECATED); - - // this is much slower than the "right" version - $this->sourceLine += mb_substr_count(mb_substr($this->source, $this->sourceOffset), "\n"); - } else { - $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset); - } + $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset); $this->sourceOffset = strlen($this->source); $this->debugInfo[$this->sourceLine] = $node->getTemplateLine();