Code Duplication    Length = 21-26 lines in 2 locations

core/EE_Error.core.php 1 location

@@ 228-253 (lines=26) @@
225
	*	@access public
226
	*	@return void
227
	*/
228
    public function get_error() {
229
230
		if( apply_filters( 'FHEE__EE_Error__get_error__show_normal_exceptions', FALSE ) ){
231
			throw $this;
232
		}
233
		// get separate user and developer messages if they exist
234
		$msg = explode( '||', $this->getMessage() );
235
		$user_msg = $msg[0];
236
		$dev_msg = isset( $msg[1] ) ? $msg[1] : $msg[0];
237
		$msg = WP_DEBUG ? $dev_msg : $user_msg;
238
239
		// add details to _all_exceptions array
240
		$x_time = time();
241
		self::$_all_exceptions[ $x_time ]['name'] 	= get_class( $this );
242
		self::$_all_exceptions[ $x_time ]['file'] 		= $this->getFile();
243
		self::$_all_exceptions[ $x_time ]['line'] 		= $this->getLine();
244
		self::$_all_exceptions[ $x_time ]['msg'] 	= $msg;
245
		self::$_all_exceptions[ $x_time ]['code'] 	= $this->getCode();
246
		self::$_all_exceptions[ $x_time ]['trace'] 	= $this->getTrace();
247
		self::$_all_exceptions[ $x_time ]['string'] 	= $this->getTraceAsString();
248
		self::$_error_count++;
249
250
		//add_action( 'shutdown', array( $this, 'display_errors' ));
251
		$this->display_errors();
252
253
	}
254
255
256

core/exceptions/BaseException.php 1 location

@@ 66-86 (lines=21) @@
63
	 * @access public
64
	 * @throws \EventEspresso\Core\Exceptions\BaseException
65
	 */
66
	public function get_error() {
67
		if ( apply_filters( 'FHEE__BaseException__get_error__show_normal_exceptions', false ) ) {
68
			throw $this;
69
		}
70
		// get separate user and developer messages if they exist
71
		$msg = explode( '||', $this->getMessage() );
72
		$user_msg = $msg[0];
73
		$dev_msg = isset( $msg[1] ) ? $msg[1] : $msg[0];
74
		$msg = WP_DEBUG ? $dev_msg : $user_msg;
75
		// add details to _all_exceptions array
76
		$x_time = time();
77
		self::$_all_exceptions[ $x_time ]['name'] = get_class( $this );
78
		self::$_all_exceptions[ $x_time ]['file'] = $this->getFile();
79
		self::$_all_exceptions[ $x_time ]['line'] = $this->getLine();
80
		self::$_all_exceptions[ $x_time ]['msg'] = $msg;
81
		self::$_all_exceptions[ $x_time ]['code'] = $this->getCode();
82
		self::$_all_exceptions[ $x_time ]['trace'] = $this->getTrace();
83
		self::$_all_exceptions[ $x_time ]['string'] = $this->getTraceAsString();
84
		self::$_error_count++;
85
		$this->display_errors();
86
	}
87
88
89