Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../lib/twig/src/TokenPar...
File: ExtendsTokenParser.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* This file is part of Twig.
[3] Fix | Delete
*
[4] Fix | Delete
* (c) Fabien Potencier
[5] Fix | Delete
* (c) Armin Ronacher
[6] Fix | Delete
*
[7] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[8] Fix | Delete
* file that was distributed with this source code.
[9] Fix | Delete
*/
[10] Fix | Delete
namespace WPML\Core\Twig\TokenParser;
[11] Fix | Delete
[12] Fix | Delete
use WPML\Core\Twig\Error\SyntaxError;
[13] Fix | Delete
use WPML\Core\Twig\Node\Node;
[14] Fix | Delete
use WPML\Core\Twig\Token;
[15] Fix | Delete
/**
[16] Fix | Delete
* Extends a template by another one.
[17] Fix | Delete
*
[18] Fix | Delete
* {% extends "base.html" %}
[19] Fix | Delete
*
[20] Fix | Delete
* @final
[21] Fix | Delete
*/
[22] Fix | Delete
class ExtendsTokenParser extends \WPML\Core\Twig\TokenParser\AbstractTokenParser
[23] Fix | Delete
{
[24] Fix | Delete
public function parse(\WPML\Core\Twig\Token $token)
[25] Fix | Delete
{
[26] Fix | Delete
$stream = $this->parser->getStream();
[27] Fix | Delete
if ($this->parser->peekBlockStack()) {
[28] Fix | Delete
throw new \WPML\Core\Twig\Error\SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext());
[29] Fix | Delete
} elseif (!$this->parser->isMainScope()) {
[30] Fix | Delete
throw new \WPML\Core\Twig\Error\SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext());
[31] Fix | Delete
}
[32] Fix | Delete
if (null !== $this->parser->getParent()) {
[33] Fix | Delete
throw new \WPML\Core\Twig\Error\SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext());
[34] Fix | Delete
}
[35] Fix | Delete
$this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
[36] Fix | Delete
$stream->expect(\WPML\Core\Twig\Token::BLOCK_END_TYPE);
[37] Fix | Delete
return new \WPML\Core\Twig\Node\Node();
[38] Fix | Delete
}
[39] Fix | Delete
public function getTag()
[40] Fix | Delete
{
[41] Fix | Delete
return 'extends';
[42] Fix | Delete
}
[43] Fix | Delete
}
[44] Fix | Delete
\class_alias('WPML\\Core\\Twig\\TokenParser\\ExtendsTokenParser', 'WPML\\Core\\Twig_TokenParser_Extends');
[45] Fix | Delete
[46] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function