Jump to content

how to enable php5 code to match php4 syntax?


adam9110

Recommended Posts

Here is the code which is available in php5

 

$this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id);

 

But when i try in pHP4 ,

 

get

 

Parse error: parse error, unexpected T_OBJECT_OPERATOR

 

How to modify these code to match PHP4 syntax?

 

Thanks very much..

original code is:

 

function get_parent_supplier(){

      if(is_object($this->parent_group)){

        if(is_object($this->parent_supplier)){

            return $this->parent_supplier;

        } else {

            $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id);

            return $this->parent_supplier;

        }

      } else {

        $this->parent_group =  new supplier_admin_group($this->supplier_admin_group_id);

        $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id);

        return $this->parent_supplier;

      }

  }

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.