Changeset 17951

Show
Ignore:
Timestamp:
10/06/08 10:51:18 (2 months ago)
Author:
rambo
Message:

cannot use try/catch in branch-28, core does not raise the exceptions, also: not php4 compatible syntax

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/net.nemein.discussion/helper_email_import.php

    r17264 r17951  
    504504        foreach ($results as $result) 
    505505        { 
    506             try 
    507             { 
    508                 $post = new net_nemein_discussion_post($result->parentguid); 
    509                 if ($post->guid) 
    510                 { 
    511                     return $post; 
    512                 } 
    513             } 
    514             catch (midgard_error_exception $e) 
     506            $post = new net_nemein_discussion_post($result->parentguid); 
     507            if (   !is_object($post) 
     508                || !isset($post->guid) 
     509                || empty($post->guid)) 
    515510            { 
    516511                continue; 
    517512            } 
     513            return $post; 
    518514        } 
    519515