During one page checkout, after filling the shipping address and click upon next button page again redirects to cart page?

No errors are displaying and my log file also empty.

On app\code\core\Mage\Checkout\controllers\OnepageController.php file inside the method saveShippingAction() I can see $this->_getShippingMethodsHtml(). This causes the error.

To find the error on root folder index.php I changed the below line

#ini_set('display_errors', 1);


ini_set('display_errors', 1);

now on console I found below issue,

<br />
<b>Fatal error</b>:  Can't use method return value in write context in <b>/magento/htdocs/app/design
/frontend/default/default/template/deliverydate/shipping_method/available.phtml</b> on line <b>67</b
><br />

on available.phtml line no 67 I can find below:

<?php if(!empty($_rate->getMethodDescription())):?>
        <p class="address-block hide">
            <?php echo $_rate->getMethodDescription(); ?>
<?php endif;?>

Note: The same is working fine on my local server, I faced this issue on production server only.

1 Answer 1


PHP empty function, prior to PHP 5.5.0 only accepts variables as parameters; see here http://php.net/manual/en/function.empty.php. Are you running different PHP versions on your local vs production?

  • Yes, on my local php version is 5.5.12 and server version is 5.4.43. what do you mean by variables as parameters? You mean I have to assign into variable $_rate->getMethodDescription() and pass the variable into !empty()?
    – Anto S
    Aug 3, 2015 at 7:47
  • 1
    Yes I understood. Other answer stackoverflow.com/questions/1075534/… gives more clarity for your point. Got it.
    – Anto S
    Aug 3, 2015 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.