Skip to content

Commit

Permalink
Merge pull request #140 from rafaelpatro/fix_invalid_argument
Browse files Browse the repository at this point in the history
Correção para Warning: Invalid argument supplied for foreach
  • Loading branch information
pedro-teixeira committed Mar 21, 2016
2 parents 784ef6a + 34c1507 commit de0c1bf
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,9 @@ protected function _removeInvalidServices()
protected function _addPostMethods($cServico)
{
$addMethods = $this->getConfigData("add_postmethods");
if (empty($addMethods) || !is_array($addMethods)) {
return $cServico;
}
foreach ($addMethods as $configData) {
$isValid = true;
$isValid &= $this->_packageWeight >= $configData['from']['weight'];
Expand Down

0 comments on commit de0c1bf

Please sign in to comment.