Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2012
    Posts
    115
    Plugin Contributions
    1

    Idea or Suggestion error due to php 7.1.5

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

    How to solve this

    [09-Oct-2018 12:43:18 Europe/Berlin] PHP Warning: A non-numeric value encountered in ../includes/classes/categories_ul_generator.php on line 58

    line 58 is this code

    $result = sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level+1) . '"' : '' );

    on printing $this->parent_group_start_string echos blank

    In another server where php is 5.6 , doesn't generate the error

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,557
    Plugin Contributions
    20

    Default Re: error due to php 7.1.5

    Add "$level = (int)$level;" so it look like this,
    PHP Code:
            $level = (int)$level;
            
    $result sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level+1) . '"' '' ); 
    or use the "/includes/classes/categories_ul_generator.php" file from the Zen Cart 1.5.6 repo on github

 

 

Similar Threads

  1. v151 Upgrading v151 to v152 due to php upgrade
    By pazdar in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 4 Mar 2014, 10:53 PM
  2. cant install due to php version check
    By bigduffeye in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 18 Apr 2013, 10:59 AM
  3. Replies: 6
    Last Post: 15 Apr 2013, 03:23 AM
  4. strange error message - due to HTMLAREA?
    By lodestar in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Nov 2009, 12:36 PM
  5. unable to code new logo due to PHP
    By chachab in forum General Questions
    Replies: 3
    Last Post: 19 Apr 2008, 06:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR