Ignore:
Timestamp:
Sep 5, 2008, 3:24:01 AM (16 years ago)
Author:
rvelices
Message:
  • better management of fatal errors (instead of die or trigger_error rather use fatal_error ...)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_url.inc.php

    r2299 r2502  
    220220{
    221221  global $conf;
    222   if (!isset($params['image_id']))
    223   {
    224     die('make_picture_url: image_id is a required parameter');
    225   }
     222
     223  isset($params['image_id']) or fatal_error('make_picture_url: image_id is a required parameter');
    226224
    227225  $url = get_root_url().'picture';
     
    376374      if (!isset($params['tags']) or count($params['tags']) == 0)
    377375      {
    378         die('make_section_in_url: require at least one tag');
     376        fatal_error('make_section_in_url: require at least one tag');
    379377      }
    380378
     
    407405    case 'search' :
    408406    {
    409       if (!isset($params['search']))
    410       {
    411         die('make_section_in_url: require a search identifier');
    412       }
    413 
     407      isset($params['search']) or fatal_error('make_section_in_url: require a search identifier');
    414408      $section_string.= '/search/'.$params['search'];
    415 
    416409      break;
    417410    }
    418411    case 'list' :
    419412    {
    420       if (!isset($params['list']))
    421       {
    422         die('make_section_in_url: require a list of items');
    423       }
    424 
     413      isset($params['list']) or fatal_error('make_section_in_url: require a list of items');
    425414      $section_string.= '/list/'.implode(',', $params['list']);
    426 
    427415      break;
    428416    }
Note: See TracChangeset for help on using the changeset viewer.