Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jul 2012
    Posts
    15,172
    Plugin Contributions
    17

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Quote Originally Posted by chadlly2003 View Post
    where do i put that piece of code.

    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    From I think post 2 line 313 is the below for line the new code goes just before it:
    Code:
    else {
    for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    Like so:
    Code:
    else {
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  2. #12
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    1,643
    Plugin Contributions
    5

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    Quote Originally Posted by chadlly2003 View Post
    where do i put that piece of code.

    Code:
    if (empty($quotes[$i]['methods'])) {
     $quotes[$i]['methods'] = array();
    }
    you would put it after your else statement and before the statement that begins with the for. which i think is line 313.

    i resolved it by doing this:

    PHP Code:
                                  <?php } else {
                                          if (
    is_array($quotes[$i]['methods'])) {
                                              for (
    $j 0$n2 sizeof($quotes[$i]['methods']); $j $n2$j++) {
    // more code

    }
    you have to find the end bracket `}` for the for loop and the then close the if statement that you added.

    this has worked for me with a couple of clients; but our versions of FEC seem different/modified as my line numbers come no where close to yours.

    good luck.
    practice #socialdistancing #staysafe
    email is hard....
    help out with the green....

  3. #13
    Join Date
    Jan 2015
    Posts
    278
    Plugin Contributions
    0

    Default Re: Upgrade Question - Parameter must be an array or an object that implements Counta

    that seems to work. Thank you

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 7
    Last Post: 30 Dec 2019, 05:21 PM
  2. Replies: 3
    Last Post: 24 Dec 2019, 08:16 AM
  3. Replies: 11
    Last Post: 21 Dec 2018, 09:06 PM
  4. Replies: 7
    Last Post: 16 Dec 2018, 04:00 PM
  5. v154 PHP Warning: extract() expects parameter 1 to be array
    By JoeH in forum General Questions
    Replies: 2
    Last Post: 15 May 2018, 06:44 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