Author Topic: USPS 4.2 exception when no domestic options selected in configuration  (Read 5005 times)

bcohen0

  • Beginner
  • *
  • Posts: 31
Hello, In case anyone is interested, I discovered that when I shut off all the domestic options for usps4.2 I get an exception on line 318 because $usps_ship_active is null. I suspect the same thing would be seen for $usps_intl_active if you shut off all the international options.


klattr1

  • Jr. Member
  • **
  • Posts: 80
Re: USPS 4.2 exception when no domestic options selected in configuration
« Reply #1 on: January 23, 2011, 00:23:53 am »
I am experiencing the same issue. I am only using FedEx for domestic shipping and only USPS for international shipping. I get the "Warning: in_array() expects parameter 2 to be array, null given..." error as well.

Anyone have fixes for this? The error goes away if I enable 1 USPS domestic shipping option but I really don't want that and would prefer FedEx to handle domestic shipping for many reasons.

Here's the line of code it's referencing:
Code: [Select]
if (in_array($serviceName, $usps_ship_active)){

klattr1

  • Jr. Member
  • **
  • Posts: 80
Anyone else figure out a solution to this?

lowmips

  • Global Moderator
  • Hero Member
  • *
  • Posts: 1464
    • lowmips.com
You could try changing it to:

Code: [Select]
if (is_array($usps_ship_active) && in_array($serviceName, $usps_ship_active)){
Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)

klattr1

  • Jr. Member
  • **
  • Posts: 80
Reggie, that fixed it...thank god for people like you!

lowmips

  • Global Moderator
  • Hero Member
  • *
  • Posts: 1464
    • lowmips.com
No problem, glad to help.
Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)