Changeset 14760

Show
Ignore:
Timestamp:
02/06/08 15:45:06 (10 months ago)
Author:
bergie
Message:

Use property_exists for Midgard 1.9 compatibility

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager2/storage/midgard.php

    r14385 r14760  
    9191 
    9292            case 'metadata': 
    93                 if (!isset($this->object->metadata->$name)) { 
     93                if (!property_exists($this->object->metadata, $name))  
     94                { 
    9495                    throw new Exception("Missing $fieldname field in object: " . get_class($this->object->metadata)); 
    9596                } 
     
    99100            default: 
    100101                $fieldname = $this->_schema->fields[$name]['storage']['location']; 
    101                 if (!isset($this->object->$fieldname)) throw new Exception("Missing $fieldname field in object: " . get_class($this->object)); 
     102                if (!property_exists($this->object, $fieldname))  
     103                { 
     104                    throw new Exception("Missing $fieldname field in object: " . get_class($this->object)); 
     105                } 
    102106                $this->object->$fieldname = $data; 
    103107                break;