Need to make sure things are an array before performing operations.
This shouldn't be necessary - seems like a fix of the symptom instead of the cause. How do you run into the issue?
This was required for me when I upgraded my Commerce Site to the php-5.4.30-36.el6.art.x86_64.rpm on CentOS.
Drupal is a registered trademark of Dries Buytaert.