mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 10:26:32 +00:00
removed optimization as it's not compatible with Symfony cache system
This commit is contained in:
@@ -10,10 +10,6 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (PHP_VERSION_ID >= 50600) {
|
|
||||||
require_once __DIR__.'/twig_call_method.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default base class for compiled templates.
|
* Default base class for compiled templates.
|
||||||
*
|
*
|
||||||
@@ -635,8 +631,6 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|||||||
try {
|
try {
|
||||||
if (!$arguments) {
|
if (!$arguments) {
|
||||||
$ret = $object->$method();
|
$ret = $object->$method();
|
||||||
} elseif (PHP_VERSION_ID >= 50600) {
|
|
||||||
$ret = twig_call_method($object, $method, $arguments);
|
|
||||||
} else {
|
} else {
|
||||||
$ret = call_user_func_array(array($object, $method), $arguments);
|
$ret = call_user_func_array(array($object, $method), $arguments);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
function twig_call_method($object, $method, $arguments)
|
|
||||||
{
|
|
||||||
return $object->$method(...$arguments);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user