Jump to content
Sign in to follow this  
pabyford

implode(): Invalid arguments passed

Recommended Posts

Hello all,

I have a problem that I cannot figure out. Here is the error log entry:  PHP Warning:  implode(): Invalid arguments passed in /home/burnabyr/public_html/includes/functions/general.php on line 251

......and here is the code from the php file:

    } else {
      $cPath_new = implode('_', $cPath_array);
    }

    return 'cPath=' . $cPath_new;
  }

I have no idea what to do and not sure if you need the whole file to sort through this so I will attach it.

 

Thanks for any help.

 

general.php

Share this post


Link to post
Share on other sites

I have no idea what version. It's been years since I even looked at this website, it is not mine, trying to help a friend.  Most likely the community edition. As for the PHP version, again, no idea.

 

Share this post


Link to post
Share on other sites

@pabyford

Can you log into the admin side of the shop? If so:

1) Click on 'Tools' in the left hand column, then click on 'Version Checker'

2) Click on 'Tools' in the left hand column, then click on 'Server Info'

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

No because the webhost is down, and has been all day.  We are trying to change hosts, but I need to fix this before i upload those file.

 

Share this post


Link to post
Share on other sites

@pabyford

First off, you are dealing with a php WARNING. This is not an ERROR. Newer versions of PHP are much more strict that older versions, and are throwing off more warnings than in the past.

Please note that if " It's been years since I even looked at this website ", than the shop is probably running an older version of osCommerce (see @241 comment above. v2.3.1 is over 8 years old!). Older versions will have problems with newer versions of PHP.

That bit of code is in a function that defines the path to a product or category. If the site is working, I would ignore the warning. Move the files to the new host. Make sure you have your new host set the PHP version to something like v5.6, and NOT to the current v7.x! Then, plan on migrating the store to a newer version of osCommerce as soon as possible.

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

That looks like the tep_get_path() function, and it's being called with a null argument, and if $cPath_array is empty or a string, recent versions of PHP will likely complain. This function doesn't seem to have changed in a long time, but other errors upstream could be feeding it bad data. It's quite likely that any current PHP level is going to have problems with such old code. Depending on how much customization was done to the store, the easiest path may be to install "Frozen" + patches on the new server, and migrate your database and other data over to the new server. You can't install an application like osCommerce and expect it to run forever without attention!


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozenpatches or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×