Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2022
    Location
    Rock Island, Tennessee
    Posts
    10
    Plugin Contributions
    0

    Default PHP Warning: Undefined variable

    I recently upgraded from 1.5.7d to 1.5.8a and everything is working beautifully - however I am receiving the following DEBUG logs.
    Since I am not a programmer - I was hoping that you could provide a snippet that I can add to these pages that will declare the variable and satisfy php to stop the log files.

    Zencart 1.5.8a / PHP 8.0
    website: https://www.d a n i e l w a l t h e r s.com/dwstore


    PHP Warning: Undefined variable $category_depth in /includes/languages/english/responsive_classic/index.php on line 29.
    PHP Warning: Undefined variable $category_depth in /includes/languages/english/responsive_classic/index.php on line 46.
    PHP Warning: Undefined variable $category_depth in /includes/languages/english/responsive_classic/index.php on line 50.

    and also:

    PHP Warning: Undefined variable $address_arr in /includes/modules/payment/paypalwpp.php on line 1744.

    Any help will be greatly appreciated.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,711
    Plugin Contributions
    123

    Default Re: PHP Warning: Undefined variable

    The file

    includes/languages/english/responsive_classic/index.php

    should not be present on a site running 1.5.8a. This is an older style language file.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jul 2022
    Location
    Rock Island, Tennessee
    Posts
    10
    Plugin Contributions
    0

    Default Re: PHP Warning: Undefined variable

    Oh dear!! I see what you mean. Thanks so much for pointing this out.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: PHP Warning: Undefined variable

    And if an older file was still present, may want to consider what other older files might remain. Easiest to figure out if can determine why that offer file was present. Might just be the one, might not.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,159
    Plugin Contributions
    11

    Default Re: PHP Warning: Undefined variable

    PHP Warning: Undefined variable $address_arr in /includes/modules/payment/paypalwpp.php on line 1744.
    currently getrting the $address_arr error with 2.0 install. Says line 1740 in 2.0

    Since it was not addressed here, any thoughts?

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,711
    Plugin Contributions
    123

    Default Re: PHP Warning: Undefined variable

    Please open a PR and change this check from

    $address_arr == FALSE

    to

    empty($address_arr)

    includes/modules/payment/paypalwpp.php line 1740
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,159
    Plugin Contributions
    11

    Default Re: PHP Warning: Undefined variable

    master or 2.0 or both

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,711
    Plugin Contributions
    123

    Default Re: PHP Warning: Undefined variable

    Use 2.0 for bug fixes. (Core committers will merge it into master after updating 2.0.)
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v157 PHP Warning: Undefined variable $show_top_submit_button
    By wsworx in forum General Questions
    Replies: 3
    Last Post: 27 Jun 2022, 11:17 AM
  2. v157 Undefined index and undefined variable errors in paypalwpp
    By Dave224 in forum PayPal Express Checkout support
    Replies: 9
    Last Post: 7 Jan 2022, 05:11 PM
  3. Replies: 9
    Last Post: 9 Aug 2021, 06:00 AM
  4. PHP Warning: Use of undefined constant
    By keneso in forum General Questions
    Replies: 5
    Last Post: 24 Aug 2020, 03:48 PM
  5. v156 PHP Warning Use of undefined constant
    By ianhg in forum General Questions
    Replies: 6
    Last Post: 10 Oct 2019, 12:19 PM

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