public static function sendErrorsToAdmin() {
		// determine if we need to send anything
		$found = false;
		foreach (\Object\Error\Base::$errors as $k => $v) {
			if ($v['errno'] != -1) {
				$found = true;
				break;
			}
		}
		// we do not send suppresed errors to admin for now. !empty(self::$data['suppressed'])
		if ($found || !empty(self::$data['js'])) {
			$message = '<hr/>';
			$message.= '<br/>IP: ' . \Request::ip();
			$message.= '<br/>Host: ' . \Request::host();
			$message.= '<br/>Script folder: ' . getcwd();
			$message.= '<hr/>';
			$message.= str_replace('display: none;', '', self::render());
			return \Mail::send([
				'to' => self::$email,
				'subject' => 'application error',
				'message' => $message
			]);
		}
	}
public static function sendErrorsToAdmin() {
		// determine if we need to send anything
		$found = false;
		foreach (\Object\Error\Base::$errors as $k => $v) {
			if ($v['errno'] != -1) {
				$found = true;
				break;
			}
		}
		// we do not send suppresed errors to admin for now. !empty(self::$data['suppressed'])
		if ($found || !empty(self::$data['js'])) {
			$message = '<hr/>';
			$message.= '<br/>IP: ' . \Request::ip();
			$message.= '<br/>Host: ' . \Request::host();
			$message.= '<br/>Script folder: ' . getcwd();
			$message.= '<hr/>';
			$message.= str_replace('display: none;', '', self::render());
			return \Mail::send([
				'to' => self::$email,
				'subject' => 'application error',
				'message' => $message
			]);
		}
	}
public static function sendErrorsToAdmin ( ) { // determine if we need to send anything $ found = false ; foreach ( \ Object \ Error \ Base :: $ errors as $ k => $ v ) { if ( $ v [ 'errno' ] != - 1 ) { $ found = true ; break ; } } // we do not send suppresed errors to admin for now. !empty(self::$data['suppressed']) if ( $ found || ! empty ( self :: $ data [ 'js' ] ) ) { $ message = '<hr/>' ; $ message .= '<br/>IP: ' . \ Request :: ip ( ) ; $ message .= '<br/>Host: ' . \ Request :: host ( ) ; $ message .= '<br/>Script folder: ' . getcwd ( ) ; $ message .= '<hr/>' ; $ message .= str_replace ( 'display: none;' , '' , self :: render ( ) ) ; return \ Mail :: send ( [ 'to' => self :: $ email , 'subject' => 'application error' , 'message' => $ message ] ) ; } }
Send errors to administrator
Send errors to administrator