Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: Illegal string offset 'id


masterpiece

Recommended Posts

Hi

 

I have a question for someone how knows more about PHP 5.4.28

 

I have installed the the addon

jQuery/Ajax Fast checkout/Login/Create account/Shopping Cart/Bootstrap MATC 2.3.3

 

 

it looks like a great addon but i get the following error. I think it's a PHP version error

 

Warning: Illegal string offset 'id' in/home2/vmast01/public_html/includes/classes/shipping.phpon line 25

 

Warning: Illegal string offset 'id' in/home2/vmast01/public_html/includes/classes/shipping.phpon line 25

 

This is the code

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+2)), $this->modules)) ) {

$include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));

} else {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

$include_modules[] = array('class' => $class, 'file' => $value);

}

}

 

I use the oscommerce 2.3.3

Hope someone can help me solved this problem

 

Dustin

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

Please use below code.

 

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {
          $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' .     substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));
        } else {
          reset($this->modules);
          while (list(, $value) = each($this->modules)) {
            $class = substr($value, 0, strrpos($value, '.'));
            $include_modules[] = array('class' => $class, 'file' => $value);
          }
        }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...