^ TypeError {#210
#message: "count(): Argument #1 ($value) must be of type Countable|array, null given"
#code: 0
#file: "/var/www/html/lib/Local/ComponentSystem/Components/ProductCard/Templates/Default/Partials/Gallery/template.php"
#line: 8
trace: {
/var/www/html/lib/Local/ComponentSystem/Components/ProductCard/Templates/Default/Partials/Gallery/template.php:8 {
include …
› $dots = "";
› $cnt = count($data->photo);
› $overlaysLim = 5;
}
/var/www/html/lib/Local/ComponentSystem/Core/BaseComponent.php:45 {
Local\ComponentSystem\Core\BaseComponent::{closure:Local\ComponentSystem\Core\BaseComponent::renderTemplate():42} …
› ob_start();
› include $__file;
› return ob_get_clean();
}
/var/www/html/lib/Local/ComponentSystem/Core/BaseComponent.php:47 {
Local\ComponentSystem\Core\BaseComponent->renderTemplate(string $componentName, string $templateName, array $vars): string …
› return ob_get_clean();
› })($templateFile, $vars);
›
arguments: {
"/var/www/html/lib/Local/ComponentSystem/Core/../Components/ProductCard/Templates/Default/Partials/Gallery/template.php"
array:2 [ …2]
}
}
/var/www/html/lib/Local/ComponentSystem/Core/BaseComponent.php:65 {
Local\ComponentSystem\Core\BaseComponent->partial(string $name, $vars = []): string …
› $assetManager->registerComponent($cName, $this->template."/Partials/$name");
› return $this->renderTemplate(
› $cName,
arguments: {
$componentName: "ProductCard"
$templateName: "Default/Partials/Gallery"
$vars: array:2 [ …2]
}
}
/var/www/html/lib/Local/ComponentSystem/Components/ProductCard/Templates/Default/template.php:19 {
include …
› <div class="gallery_wrap">
› <?= $component->partial('Gallery') ?>
› <div class="actions">
arguments: {
$name: "Gallery"
}
}
/var/www/html/lib/Local/ComponentSystem/Core/ComponentRenderer.php:108 {
Local\ComponentSystem\Core\ComponentRenderer::{closure:Local\ComponentSystem\Core\ComponentRenderer::renderTemplate():105} …
› ob_start();
› include $__file;
› return ob_get_clean();
arguments: {
"/var/www/html/lib/Local/ComponentSystem/Components/ProductCard/Templates/Default/template.php"
}
}
/var/www/html/lib/Local/ComponentSystem/Core/ComponentRenderer.php:110 {
Local\ComponentSystem\Core\ComponentRenderer->renderTemplate(string $componentName, string $templateName, array $vars): string …
› return ob_get_clean();
› })($templateFile, $vars);
› }
arguments: {
"/var/www/html/lib/Local/ComponentSystem/Core/../Components/ProductCard/Templates/Default/template.php"
array:3 [ …3]
}
}
/var/www/html/lib/Local/ComponentSystem/Core/ComponentRenderer.php:69 {
Local\ComponentSystem\Core\ComponentRenderer->render(string $componentClass, ?DataInterface $args = null, ?string $template = null): string …
› // --- Рендерим шаблон ---
› $html = $this->renderTemplate(
› componentName: $meta->name,
arguments: {
$componentName: "ProductCard"
$templateName: "Default"
$vars: array:3 [ …3]
}
}
/var/www/html/lib/Local/ComponentSystem/Core/BaseComponent.php:85 {
Local\ComponentSystem\Core\BaseComponent::render(?DataInterface $args = null, $template = null): string …
› {
› return ComponentRenderer::getInstance()->render(static::class, $args, $template);
› }
arguments: {
$componentClass: "Local\ComponentSystem\Components\ProductCard\ProductCard"
$args: Local\ComponentSystem\Components\ProductCard\Data\ProductCardRaw {#215 …}
$template: null
}
}
/var/www/html/templates/default/controllers/shop/item_mini.tpl.php:7 {
include …
›
› echo ProductCard::render(ProductCardRaw::make($item))
› ?>
arguments: {
$args: Local\ComponentSystem\Components\ProductCard\Data\ProductCardRaw {#215 …}
}
}
/var/www/html/system/core/template.php:1537 {
cmsTemplate->renderControllerChild($controller, $tpl_file, $data = []) …
›
› extract($data); include($tpl_file);
›
arguments: {
"/var/www/html/templates/default/controllers/shop/item_mini.tpl.php"
}
}
/var/www/html/templates/default/controllers/shop/category_list.tpl.php:256 {
include …
›
› <?php $template->renderControllerChild('shop', 'item_mini', array(
› 'item' => $item, 'col' => 'col-12 px-0 dst-container-mobil-cart',
arguments: {
$controller: "shop"
$tpl_file: "/var/www/html/templates/default/controllers/shop/item_mini.tpl.php"
$data: array:3 [ …3]
}
}
/var/www/html/system/core/template.php:1498 {
cmsTemplate->processRender($tpl_file, $data = [], $request = false) …
›
› extract($data); include($tpl_file);
›
arguments: {
"/var/www/html/templates/default/controllers/shop/category_list.tpl.php"
}
}
/var/www/html/system/core/template.php:1466 {
cmsTemplate->render($tpl_file, $data = [], $request = false) …
› // dump($data);
› return $this->processRender($tpl_file, $data, $request);
›
arguments: {
$tpl_file: "/var/www/html/templates/default/controllers/shop/category_list.tpl.php"
$data: array:18 [ …18]
$request: cmsRequest {#17 …}
}
}
/var/www/html/system/controllers/shop/frontend.php:591 {
shop->renderItemsList($page_url, $hide_filter = false, $category_id = 0, $filters = [], $dataset = false, $ext_hidden_params = [], $template = '…13', $brand = false, $partner = false, $is_eng = false) …
›
› $html = $this->cms_template->render($template, $return, new cmsRequest(array(), cmsRequest::CTX_INTERNAL));
› // $html = "";
arguments: {
$tpl_file: "/var/www/html/templates/default/controllers/shop/category_list.tpl.php"
$data: array:18 [ …18]
$request: cmsRequest {#17 …}
}
}
/var/www/html/system/core/action.php:29 {
cmsAction->__call($name, $arguments) …
› public function __call($name, $arguments) {
› return call_user_func_array(array($this->controller, $name), $arguments);
› }
arguments: {
$page_url: array:2 [ …2]
$hide_filter: false
$category_id: "5302"
$filters: array:50 [ …50]
$dataset: []
}
}
/var/www/html/system/controllers/shop/actions/index.php:209 {
actionShopIndex->run() …
› ]]);
› $items_list_html = $this->renderItemsList($page_url, false, $category['id'], $field_filters, array());
› Tracing::endSpan();
arguments: {
$name: "renderItemsList"
$arguments: array:5 [ …5]
}
}
/var/www/html/system/core/controller.php:549 {
cmsController->runExternalAction($action_name, $params = []) …
› Tracing::startSpan("running {$class_name_ex} action", ['params'=>$params]);
› $r = call_user_func_array(array($action_object, 'run'), $params);
› Tracing::endSpan();
}
/var/www/html/system/core/controller.php:435 {
cmsController->runAction($action_name, $params = []) …
› Tracing::startSpan("runExternalAction", ['action_name'=>$action_name, 'action_params'=>$this->current_params] );
› $result = $this->runExternalAction($action_name, $this->current_params);
› Tracing::endSpan();
arguments: {
$action_name: "index"
$params: []
}
}
/var/www/html/system/controllers/shop/frontend.php:136 {
shop->route($uri) …
› if (!$action_name) { cmsCore::error404(); }
› $this->runAction($action_name);
› }
arguments: {
$action_name: "index"
}
}
/var/www/html/system/core/controller.php:465 {
cmsController->runAction($action_name, $params = []) …
› if ($this->current_params) { $route_uri .= '/' . implode('/', $this->current_params); }
› $result = call_user_func(array($this, 'route'), $route_uri);
›
arguments: {
$uri: "dlja-doma/dlja-hostelov-i-obschezhitii/krovati/antimagnitnye-plomby/metallicheskie-krovati-dlja-rabochih"
}
}
/var/www/html/system/core/core.php:815 {
cmsCore->runController() …
› // запускаем действие
› $controller->runAction($this->uri_action, $this->uri_params);
› return true;
arguments: {
$action_name: "dlja-doma"
$params: array:4 [ …4]
}
}
/var/www/html/index.php:136 {
› Tracing::startSpan('run controller');\r
› $core->runController();\r
› Tracing::endSpan();\r
}
}
}