mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 03:16:34 +00:00
removed code specific to older versions of PHP
This commit is contained in:
@@ -130,25 +130,6 @@ class Twig_Error extends Exception
|
||||
$this->updateRepr();
|
||||
}
|
||||
|
||||
/**
|
||||
* For PHP < 5.3.0, provides access to the getPrevious() method.
|
||||
*
|
||||
* @param string $method The method name
|
||||
* @param array $arguments The parameters to be passed to the method
|
||||
*
|
||||
* @return Exception The previous exception or null
|
||||
*
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
public function __call($method, $arguments)
|
||||
{
|
||||
if ('getprevious' == strtolower($method)) {
|
||||
return $this->previous;
|
||||
}
|
||||
|
||||
throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method));
|
||||
}
|
||||
|
||||
public function appendMessage($rawMessage)
|
||||
{
|
||||
$this->rawMessage .= $rawMessage;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!defined('ENT_SUBSTITUTE')) {
|
||||
// use 0 as hhvm does not support several flags yet
|
||||
define('ENT_SUBSTITUTE', 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This file is part of Twig.
|
||||
*
|
||||
@@ -568,11 +563,7 @@ function twig_number_format_filter(Twig_Environment $env, $number, $decimal = nu
|
||||
function twig_urlencode_filter($url)
|
||||
{
|
||||
if (is_array($url)) {
|
||||
if (defined('PHP_QUERY_RFC3986')) {
|
||||
return http_build_query($url, '', '&', PHP_QUERY_RFC3986);
|
||||
}
|
||||
|
||||
return http_build_query($url, '', '&');
|
||||
return http_build_query($url, '', '&', PHP_QUERY_RFC3986);
|
||||
}
|
||||
|
||||
return rawurlencode($url);
|
||||
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
--TEST--
|
||||
__staticCall calls
|
||||
--CONDITION--
|
||||
version_compare(phpversion(), '5.3.0', '>=')
|
||||
--TEMPLATE--
|
||||
{{ 'foo'|magic_call_string }}
|
||||
{{ 'foo'|magic_call_array }}
|
||||
Reference in New Issue
Block a user