Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-12892

Fatal error: Call to a member function attribute() on a non-object in ezorder.php

    XMLWordPrintable

Details

    Description

      Hi

      Experimenting with ezpaypal extension on ezp4.0
      When clicking "confirm" button on shop/confirmorder you get a "Fatal error: Call to a member function attribute() on a non-object in /home/ezpublish/www/kernel/classes/ezorder.php on line 1592"

      This is because the fix for #11454 have been wrongly ported to PHP5
      in rev 20085 br wrote:

      +            if ( get_class( $collection ) != 'ezproductcollection' )
      +            {
      +                $collection = eZProductCollection::fetch( $this->attribute( 'productcollection_id' ) );
      +            }
      +            $currencyCode =& $collection->attribute( 'currency_code' );
      

      This has been ported to (rev 20174 )

                  if ( $collection instanceof eZProductCollection )
                  {
                      $collection = eZProductCollection::fetch( $this->attribute( 'productcollection_id' ) );
                  }
                  $currencyCode = $collection->attribute( 'currency_code' );
              }
      

      The ! operator is gone...

      Attachments

        Activity

          People

            vl vl
            vl vl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: