Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

implode(): Invalid arguments passed


pabyford

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

Link to comment
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.

 

Link to comment
Share on other sites

the file looks like 2.3.1

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
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

Link to comment
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!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...