Ошибка при переходе в карточку товара

Ошибки при использовании модулей, установке и использовании опенкарта
DLDiz
Сообщения: 4
Зарегистрирован: 06.09.2022
Поблагодарил: 2 раз

Ошибка при переходе в карточку товара

Непрочитанное сообщение DLDiz »

Здравствуйте!
Помогите разобраться. При переходе в карточку товара выпадает ошибка: Unknown: Object of class Registry could not be converted to string in /var/www/tradefenix/data/www/storage/vendor/twig/twig/src/Loader/ArrayLoader.php on line 73
Версия ocStore 3.0.3.7
В 73 строке: return $name.':'.$this->templates[$name];
Ниже код файла. 

Код: Выделить всё

<?php

/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Twig\Loader;

use Twig\Error\LoaderError;
use Twig\Source;

/**
 * Loads a template from an array.
 *
 * When using this loader with a cache mechanism, you should know that a new cache
 * key is generated each time a template content "changes" (the cache key being the
 * source code of the template). If you don't want to see your cache grows out of
 * control, you need to take care of clearing the old cache file by yourself.
 *
 * This loader should only be used for unit testing.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
{
    private $templates = [];

    /**
     * @param array $templates An array of templates (keys are the names, and values are the source code)
     */
    public function __construct(array $templates = [])
    {
        $this->templates = $templates;
    }

    /**
     * Adds or overrides a template.
     *
     * @param string $name     The template name
     * @param string $template The template source
     */
    public function setTemplate($name, $template)
    {
        $this->templates[$name] = $template;
    }

    public function getSourceContext($name)
    {
        $name = (string) $name;
        if (!isset($this->templates[$name])) {
            throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
        }

        return new Source($this->templates[$name], $name);
    }

    public function exists($name)
    {
        return isset($this->templates[$name]);
    }

    public function getCacheKey($name)
    {
        if (!isset($this->templates[$name])) {
            throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
        }

        return $name.':'.$this->templates[$name];
    }

    public function isFresh($name, $time)
    {
        if (!isset($this->templates[$name])) {
            throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
        }

        return true;
    }
}

class_alias('Twig\Loader\ArrayLoader', 'Twig_Loader_Array');



 
Аватара пользователя
devimirochnik
Разработчик дополнений
Сообщения: 164
Зарегистрирован: 14.04.2022
Откуда: Россия
Мои дополнения: devimirochnik
Поблагодарил: 2 раз
Спасибо: 10 раз

Re: Ошибка при переходе в карточку товара

Непрочитанное сообщение devimirochnik »

Здравствуйте

А что в стеке вызова до этого? Не всегда проблема в конечном методе
Мои модули: Оптимизация, SEO, Скидки, Отчёты и прочее

Также могу заняться задачами по вашему сайту в рамках фриланса. График ненормированный, но дело делаю.
Ответить