Projekt

Allgemein

Profil

GX-Bug #66497

Von Ulrich Wenk vor mehr als 4 Jahren aktualisiert

wenn ein Shop nur eine Währung hat, wirft die "box_currencies_dropdown.html" unter PHP7.2 einen "count must be countable..." Fehler 

 if a shop has only one currency, the "box_currencies_dropdown.html" under PHP7.2 throws a "count must be countable... Error 

 Das Problem tritt häuft in cloud Shops auf, siehe dazu das externe Ticket im Sentry 

 The problem occurs more often in cloud shops, see the external ticket in the Sentry 

 ______________ 

 **EDIT** 14.04.2020 

 1. go to Shop settings > Zone / Tax > Currencies 
 2. delete the all but the standard currencies 
 3. call the frontend, open the currency/language selector 

 result: 

 * ```WARNING(2): "count(): Parameter must be an array or an object that implements Countable"``` gets displayed in the flyover, see screenshot 
 ` ` ` 

 __________________ 
 (6795156a1fb17521883410f86ff5351b) WARNING(2): \"count(): Parameter must be an array or an object that implements Countable\" in /var/www/vendor/sentry/sentry/lib/Raven/ErrorHandler.php:127 

 #16 File: /var/www/vendor/sentry/sentry/lib/Raven/ErrorHandler.php:127 

 Code: 
 │ line 125: $file, 
 │ line 126: $line, 
 ├─ line 127: $context 
 │ line 128: ); 
 │ line 129: } else { 

 #15 File: /var/www/templates_c/91d5a7f164fe32fca25b70e93975cc513bb38acb_0.file.layout_secondary_navigation_currencies_dropdown.html.php:87 

 Code: 
 │ line 85: ?> 
 │ line 86: 
 ├─ line 87: tpl_vars['content_data']->value['currencies_data']) > 0) {?> 
 │ line 88: │ line 89: $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_15736471115e905cf27545c5_75968184', \"layout_secondary_navigation_currencies_dropdown_select\", $this->tplIndex); 

 #14 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:248 

 Code: 
 │ line 246: $this->sourceStack[] = $tpl->source; 
 │ line 247: $tpl->source = $this->sources[ $block->tplIndex ]; 
 ├─ line 248: $block->callBlock($tpl); 
 │ line 249: $tpl->source = array_pop($this->sourceStack); 
 │ line 250: } 

 #13 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:184 

 Code: 
 │ line 182: } 
 │ line 183: if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) { 
 ├─ line 184: $this->callBlock($block, $tpl); 
 │ line 185: } else { 
 │ line 186: $this->process($tpl, $block->child, $block); 

 #12 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:156 

 Code: 
 │ line 154: $block->child = $block->child->child; 
 │ line 155: } 
 ├─ line 156: $this->process($tpl, $block); 
 │ line 157: } 
 │ line 158: 

 #11 File: /var/www/templates_c/91d5a7f164fe32fca25b70e93975cc513bb38acb_0.file.layout_secondary_navigation_currencies_dropdown.html.php:26 

 Code: 
 │ line 24: $_smarty_tpl->_loadInheritance(); 
 │ line 25: $_smarty_tpl->inheritance->init($_smarty_tpl, false); 
 ├─ line 26: $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_19204248525e905cf27522c5_78368036', \"layout_secondary_navigation_currencies_dropdown\"); 
 │ line 27: } 
 │ line 28: /* {block \"layout_secondary_navigation_currencies_dropdown_option\"} */ 

 #10 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123 

 Code: 
 │ line 121: } 
 │ line 122: } 
 ├─ line 123: $unifunc($_template); 
 │ line 124: foreach ($_template->endRenderCallbacks as $callback) { 
 │ line 125: call_user_func($callback, $_template); 

 #9 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114 

 Code: 
 │ line 112: $_template->source->handler->renderUncompiled($_template->source, $_template); 
 │ line 113: } else { 
 ├─ line 114: $this->getRenderedTemplateCode($_template); 
 │ line 115: } 
 │ line 116: if ($_template->caching && $this->has_nocache_code) { 

 #8 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216 

 Code: 
 │ line 214: $this->loadCompiled(true); 
 │ line 215: } 
 ├─ line 216: $this->compiled->render($this); 
 │ line 217: } 
 │ line 218: // display or fetch 

 #7 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:232 

 Code: 
 │ line 230: $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars); 
 │ line 231: } 
 ├─ line 232: $result = $template->render(false, $function); 
 │ line 233: $template->_cleanUp(); 
 │ line 234: if ($saveVars) { 

 #6 File: /var/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116 

 Code: 
 │ line 114: public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null) 
 │ line 115: { 
 ├─ line 116: $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0); 
 │ line 117: return $result === null ? ob_get_clean() : $result; 
 │ line 118: } 

 #5 File: /var/www/GXMainComponents/View/ThemeContentViews/core/ThemeContentView.inc.php:473 

 Code: 
 │ line 471: } 
 │ line 472: 
 ├─ line 473: $t_html_output = $this->v_coo_smarty->fetch($fetchTemplatePath, $this->get_cache_id()); 
 │ line 474: 
 │ line 475: # insert session_ids 

 #4 File: /var/www/GXMainComponents/View/ThemeContentViews/core/ThemeContentView.inc.php:149 

 Code: 
 │ line 147: $this->prepare_data(); 
 │ line 148: if ($this->build_html == true) { 
 ├─ line 149: $t_html_output = $this->build_html(); 
 │ line 150: } 
 │ line 151: 

 #3 File: /var/www/GXMainComponents/View/Boxes/boxes/top_menu.php:29 

 Code: 
 │ line 27: } 
 │ line 28: $coo_currencies_dropdown->set_currency_dropdown_template(); 
 ├─ line 29: $t_currencies_dropdown_html = $coo_currencies_dropdown->get_html(); 
 │ line 30: } 
 │ line 31: 

 #2 File: /var/www/GXMainComponents/View/Boxes/boxes.php:21 

 Code: 
 │ line 19: include(DIR_WS_BOXES . 'gm_logo.php'); 
 │ line 20: include(DIR_WS_BOXES . 'slider.php'); 
 ├─ line 21: include(DIR_WS_BOXES . 'top_menu.php'); 
 │ line 22: 
 │ line 23: if (gm_get_conf('CAT_MENU_TOP') == 'true') { 

 #1 File: /var/www/system/classes/menuboxes/MenuBoxesContentControl.php:97 

 Code: 
 │ line 95: if (StaticGXCoreLoader::getThemeControl()->isThemeSystemActive()) { 
 │ line 96: 
 ├─ line 97: include(DIR_FS_CATALOG . 'GXMainComponents/View/Boxes/boxes.php'); 
 │ line 98: } else { 
 │ line 99: include(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php'); 

 #0 File: /var/www/index.php:62 

 Code: 
 │ line 60: $coo_mn_menu_boxes_control->set_('coo_product', $GLOBALS['product']); 
 │ line 61: $coo_mn_menu_boxes_control->set_('coo_xtc_price', $GLOBALS['xtPrice']); 
 ├─ line 62: $coo_mn_menu_boxes_control->proceed(); 
 │ line 63: 
 │ line 64: $coo_listing_control = MainFactory::create_object('ProductListingContentControl'); 

 ` ` `

Zurück