Ankündigung

Einklappen
Keine Ankündigung bisher.

[fix verfügbar] Errorlogs in PHP 7.1 durch categories_ul_generator.php

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    [fix verfügbar] Errorlogs in PHP 7.1 durch categories_ul_generator.php

    Hallo,
    ich bekomme seit Update auf 1.5.5f sehr sehr viele analoge Fehlermeldungen:
    Code:
    [02-Apr-2019 11:22:03 Europe/Berlin] Request URI: /KategorieXXX/Artikel-XXX.html, IP address: xx.xx.xx.xx
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php:74]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php:255]
    #4  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/XXX/XXX/Meineshop/index.php:97]
    
    [02-Apr-2019 11:22:03 Europe/Berlin] PHP Warning:  A non-numeric value encountered in /XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php on line 47
    [02-Apr-2019 11:22:03 Europe/Berlin] Request URI: /KategorieXXX/Artikel-XXX.html, IP address: xx.xx.xx.xx
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php:74]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/XXX/XXX/Meineshopincludes/templates/responsive_classic/common/tpl_main_page.php:255]
    #4  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/XXX/XXX/Meineshop/shop/index.php:97]
    
    [02-Apr-2019 11:22:03 Europe/Berlin] PHP Warning:  A non-numeric value encountered in /XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php on line 62
    [02-Apr-2019 11:22:03 Europe/Berlin] Request URI: /KategorieXXX/Artikel-XXX.html, IP address: xx.xx.xx.xx
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php:74]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php:255]
    #4  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/XXX/XXX/Meineshop/index.php:97]
    
    [02-Apr-2019 11:22:03 Europe/Berlin] PHP Warning:  A non-numeric value encountered in /XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php on line 62
    [02-Apr-2019 11:22:03 Europe/Berlin] Request URI: /KategorieXXX/Artikel-XXX.html, IP address: xx.xx.xx.xx
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php:74]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php:255]
    #4  require(/XXX/XXX/XXX/XXX/Meineshop/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/XXX/XXX/Meineshop/index.php:97]
    
    [02-Apr-2019 11:22:03 Europe/Berlin] PHP Warning:  A non-numeric value encountered in /XXX/XXX/XXX/XXX/Meineshop/includes/classes/categories_ul_generator.php on line 62
    Hat jemand eine Idee was hier zu ändern wäre?
    Zuletzt geändert von webchills; 02.04.2019, 17:27.

    #2
    Fehlende Anpassung für PHP 7.1 in includes/classes/categories_ul_generator.php
    Ändere den Inhalt dieser Datei auf den folgenden ab:
    Code:
    <?php
    /**
    
     * @package classes
     * @copyright Copyright 2003-2019 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart-pro.at/license/2_0.txt GNU Public License V2.0
     * @version $Id: categories_ul_generator.php 2019-03-21 16:13:16Z webchills $
     */
    
    
    class zen_categories_ul_generator {
        var $root_category_id = 0,
        $max_level = 0,
        $data = array(),
        $parent_group_start_string = '<ul%s>',
        $parent_group_end_string = '</ul>',
        $child_start_string = '<li%s>',
        $child_end_string = '</li>',
        $spacer_string = '
    ',
        $spacer_multiplier = 1;
        
        var $document_types_list = ' (3) ';
        // acceptable format example: ' (3, 4, 9, 22, 18) '
        
        function __construct($load_from_database = true)
        {
            global $db;
            $this->data = array();
            $categories_query = "SELECT c.categories_id, cd.categories_name, c.parent_id
                                 FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                 WHERE c.categories_id = cd.categories_id
                                 AND c.categories_status = 1
                                 AND cd.language_id = " . (int)$_SESSION['languages_id'] . "
                                 ORDER BY c.parent_id, c.sort_order, cd.categories_name";
            $categories = $db->Execute($categories_query);
            while (!$categories->EOF) {
                $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
                $categories->MoveNext();
            }
        }
        
        function buildBranch($parent_id, $level = 0, $submenu=true, $parent_link='')
        {
            $level = (int)$level;
            $result = sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ((float)$level+1) . '"' : '' );
            
            if (($this->data[$parent_id])) {
                foreach($this->data[$parent_id] as $category_id => $category) {
                    $category_link = $parent_link . $category_id;
                    if (isset($this->data[$category_id])) {
                        $result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu"' : '');
                    } else {
                        $result .= sprintf($this->child_start_string, '');
                    }
                    $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * 1) . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">';
                    $result .= $category['name'];
                    $result .= '</a>';
    
                    if (isset($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) {
                        $result .= $this->buildBranch($category_id, $level+1, $submenu, $category_link . '_');
                    }
                    $result .= $this->child_end_string;
                }
            }
            
            $result .= $this->parent_group_end_string;
            return $result;
        }
        
        function buildTree($submenu=false)
        {
            return $this->buildBranch($this->root_category_id, '', $submenu);
        }
    }

    Kommentar

    Info zu diesem Forenarchiv:
    Mit Release von 1.5.7 wurde die deutsche Zen Cart Version auf eine reine DIY-Lösung umgestellt.
    Für einen Support via Forum stehen keine personellen und zeitlichen Ressourcen mehr zur Verfügung.
    Dieses Supportforum bleibt im Nur-Lesen-Modus als Wissensarchiv noch online verfügbar.
    PM Funktionalität, Registrierung und Posten neuer Beiträge sind deaktiviert.
    Zugriff auf Anhänge in den Postings ist auch ohne Registrierung/Einloggen möglich.
    FAQ und Downloadbereich des Forums wurden in die neue umfangreiche Knowledgebase auf der zen-cart-pro.at Website übernommen.

    Das Development der deutschen Zen Cart Version geht wie bisher auf Github weiter.
    Wir werden auch weiterhin neue Versionen bereitstellen und die Onlinedokumentation/Knowledgebase aktualisieren.
    Fehler in der Software können auf Github als Issues gemeldet werden.
    Follow us
    aktuelle version
    Zen Cart 1.5.7 deutsch
    vom 20.05.2022
    [Download]
    Lädt...
    X