Changeset 5017 for branches


Ignore:
Timestamp:
Mar 1, 2010, 10:23:51 PM (14 years ago)
Author:
rvelices
Message:

use fatal_error instead of die function (fatal_error leaves a trace in php error log making easier to see potential problems on "production" galleries)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/functions.inc.php

    r5003 r5017  
    15171517    $param_value = $param_array[$param_name];
    15181518  }
    1519  
     1519
    15201520  // it's ok if the input parameter is null
    15211521  if (empty($param_value))
     
    15231523    return true;
    15241524  }
    1525  
     1525
    15261526  if ($is_array)
    15271527  {
    15281528    if (!is_array($param_value))
    15291529    {
    1530       die('[Hacking attempt] the input parameter "'.$param_name.'" should be an array');
     1530      fatal_error('[Hacking attempt] the input parameter "'.$param_name.'" should be an array');
    15311531    }
    15321532
     
    15351535      if (!preg_match($pattern, $item_to_check))
    15361536      {
    1537         die('[Hacking attempt] an item is not valid in input parameter "'.$param_name.'"');
     1537        fatal_error('[Hacking attempt] an item is not valid in input parameter "'.$param_name.'"');
    15381538      }
    15391539    }
     
    15431543    if (!preg_match($pattern, $param_value))
    15441544    {
    1545       die('[Hacking attempt] the input parameter "'.$param_name.'" is not valid');
     1545      fatal_error('[Hacking attempt] the input parameter "'.$param_name.'" is not valid');
    15461546    }
    15471547  }
     
    15531553 * else pwg_token is compare to server token
    15541554 *
    1555  * @return void access denied if token given is not equal to server token 
     1555 * @return void access denied if token given is not equal to server token
    15561556 */
    15571557function check_pwg_token()
     
    15701570  if ($given_token != $valid_token)
    15711571  {
    1572     access_denied();   
     1572    access_denied();
    15731573  }
    15741574}
Note: See TracChangeset for help on using the changeset viewer.