Changeset 27130

Show
Ignore:
Timestamp:
01/16/12 11:09:06 (3 years ago)
Author:
rambo
Message:

merge r27129 to trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/ragnaroek/midcom/midcom.core/midcom/helper/_dbfactory.php

    r27069 r27130  
    631631            $acl_object_in_db = true; 
    632632            $actual_object_in_db = true; 
    633             midcom_baseclasses_core_dbobject::cast_object($acl_object, $unserialized_object); 
     633            // Backup original ID, the unserialized one has no id... 
     634            $original_id = (int)$acl_object->id; 
     635            if (!midcom_baseclasses_core_dbobject::cast_object($acl_object, $unserialized_object)) 
     636            { 
     637                debug_add('Failed to cast MidCOM DBA object for ACL checks from $unserialized_object', MIDCOM_LOG_ERROR); 
     638                debug_print_r('$unserialized_object: ', $unserialized_object); 
     639                debug_pop(); 
     640                return false; 
     641            } 
     642            // Restore the ID after cast 
     643            $acl_object->id = $original_id; 
     644            unset($original_id); 
    634645        } 
    635646        else