Changeset 2502 for trunk/include/functions.inc.php
- Timestamp:
- Sep 5, 2008, 3:24:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r2497 r2502 233 233 if ($mkd==false) 234 234 { 235 !($flags&MKGETDIR_DIE_ON_ERROR) or trigger_error( "$dir ".l10n('no_write_access'), E_USER_ERROR);235 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no_write_access')); 236 236 return false; 237 237 } … … 251 251 if ( !is_writable($dir) ) 252 252 { 253 !($flags&MKGETDIR_DIE_ON_ERROR) or trigger_error( "$dir ".l10n('no_write_access'), E_USER_ERROR);253 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no_write_access')); 254 254 return false; 255 255 } … … 946 946 // my_error returns (or send to standard output) the message concerning the 947 947 // error occured for the last mysql query. 948 949 948 function my_error($header, $die) 950 949 { 951 $error = $header; 952 $error.= "\n[mysql error ".mysql_errno().'] '.mysql_error()."\n"; 953 954 if (function_exists('debug_backtrace')) 955 { 956 $bt = debug_backtrace(); 957 for ($i=0; $i<count($bt); $i++) 958 { 959 $error .= "#$i\t".@$bt[$i]['function']." ".@$bt[$i]['file']."(".@@$bt[$i]['line'].")\n"; 960 } 961 } 950 $error = "[mysql error ".mysql_errno().'] '.mysql_error()."\n"; 951 $error .= $header; 962 952 963 953 if ($die) 964 954 { 965 @set_status_header(500); 966 echo( str_repeat( ' ', 300)."\n"); //IE doesn't error output if below a size 955 fatal_error($error); 967 956 } 968 957 echo("<pre>"); 969 trigger_error($error, $die ? E_USER_ERROR : E_USER_WARNING); 970 !$die || die($error); // just in case the handler didnt die 958 trigger_error($error, E_USER_WARNING); 971 959 echo("</pre>"); 972 960 } … … 1138 1126 else 1139 1127 { 1140 die('l10n_args: Invalid arguments');1128 fatal_error('l10n_args: Invalid arguments'); 1141 1129 } 1142 1130 … … 1222 1210 if ((mysql_num_rows($result) == 0) and !empty($condition)) 1223 1211 { 1224 die('No configuration data');1212 fatal_error('No configuration data'); 1225 1213 } 1226 1214 … … 1372 1360 function get_pwg_charset() 1373 1361 { 1374 defined('PWG_CHARSET') or die('load_language PWG_CHARSET undefined');1362 defined('PWG_CHARSET') or fatal_error('load_language PWG_CHARSET undefined'); 1375 1363 return PWG_CHARSET; 1376 1364 }
Note: See TracChangeset
for help on using the changeset viewer.