Changeset 1348

Show
Ignore:
Timestamp:
12/04/07 11:12:52 (1 year ago)
Author:
rho
Message:

minor tweak on error handling to templates_add_context function

Signed-off: Rolando Espinoza La fuente <rho@prosoftpeople.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/lib/templates.php

    r1342 r1348  
    15781578            foreach ($template_files[$context] as $k => $tpl) { 
    15791579                // TODO: check again if is readable? 
    1580                 $template[$context] .= @file_get_contents($tpl); 
    1581                 //print_object('Loaded: ' . $tpl); 
     1580                if (is_readable($tpl)) { 
     1581                    $template[$context] .= @file_get_contents($tpl); 
     1582                    //print_object('Loaded: ' . $tpl); 
     1583                } else { 
     1584                    trigger_error(__FUNCTION__.": template file does not exists (context: $context, file: $tpl)", E_USER_ERROR); 
     1585                } 
    15821586            } 
    15831587        } else {