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/Node
File: CheckToStringNode.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
*
[6] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[7] Fix | Delete
* file that was distributed with this source code.
[8] Fix | Delete
*/
[9] Fix | Delete
namespace WPML\Core\Twig\Node;
[10] Fix | Delete
[11] Fix | Delete
use WPML\Core\Twig\Compiler;
[12] Fix | Delete
use WPML\Core\Twig\Node\Expression\AbstractExpression;
[13] Fix | Delete
/**
[14] Fix | Delete
* Checks if casting an expression to __toString() is allowed by the sandbox.
[15] Fix | Delete
*
[16] Fix | Delete
* For instance, when there is a simple Print statement, like {{ article }},
[17] Fix | Delete
* and if the sandbox is enabled, we need to check that the __toString()
[18] Fix | Delete
* method is allowed if 'article' is an object. The same goes for {{ article|upper }}
[19] Fix | Delete
* or {{ random(article) }}
[20] Fix | Delete
*
[21] Fix | Delete
* @author Fabien Potencier <fabien@symfony.com>
[22] Fix | Delete
*/
[23] Fix | Delete
class CheckToStringNode extends \WPML\Core\Twig\Node\Expression\AbstractExpression
[24] Fix | Delete
{
[25] Fix | Delete
public function __construct(\WPML\Core\Twig\Node\Expression\AbstractExpression $expr)
[26] Fix | Delete
{
[27] Fix | Delete
parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag());
[28] Fix | Delete
}
[29] Fix | Delete
public function compile(\WPML\Core\Twig\Compiler $compiler)
[30] Fix | Delete
{
[31] Fix | Delete
$compiler->raw('$this->sandbox->ensureToStringAllowed(')->subcompile($this->getNode('expr'))->raw(')');
[32] Fix | Delete
}
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function