Ignore:
Timestamp:
06/25/15 15:38:45 (9 years ago)
Author:
nanardon
Message:

Fix object return detection: stringify return null if _id is unset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm

    r1357 r1358  
    7878    # finding perl class: 
    7979    my $pclass = $base->_load_obj_class($otype) or return; 
    80     my $newobj = "$pclass"->new($base, $id, @args) or return; 
     80    my $newobj = "$pclass"->new($base, $id, @args); 
     81 
     82    defined($newobj) or do { 
     83        $base->log(LA_DEBUG, "$pclass->new() returned undef for $otype / $id"); 
     84        return; 
     85    }; 
    8186 
    8287    $newobj->{_base} = $base; 
Note: See TracChangeset for help on using the changeset viewer.