Project

General

Profile

« Previous | Next » 

Revision 19c8976b

Added by Chris Buechler over 10 years ago

Log PHP errors. Ticket #4143

View differences:

etc/inc/config.lib.inc
919 919
function pfSense_clear_globals() {
920 920
	global $config, $FilterIfList, $GatewaysList, $filterdns, $aliases, $aliastable;
921 921

  
922
	$error = error_get_last();
923
	
924
	if ( $error !== NULL) {
925
		if ( $error['type'] != E_NOTICE ) {
926
			$errorstr = "PHP ERROR: Type: {$error['type']}, File: {$error['file']}, Line: {$error['line']}, Message: {$error['message']}";
927
			print($errorstr);
928
			log_error($errorstr);
929
		}
930
	}
931

  
922 932
	if (isset($FilterIfList))
923 933
		unset($FilterIfList);
924 934

  

Also available in: Unified diff