wp/wp-includes/error-protection.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    48 	$constants   = get_defined_constants( true );
    48 	$constants   = get_defined_constants( true );
    49 	$constants   = isset( $constants['Core'] ) ? $constants['Core'] : $constants['internal'];
    49 	$constants   = isset( $constants['Core'] ) ? $constants['Core'] : $constants['internal'];
    50 	$core_errors = array();
    50 	$core_errors = array();
    51 
    51 
    52 	foreach ( $constants as $constant => $value ) {
    52 	foreach ( $constants as $constant => $value ) {
    53 		if ( 0 === strpos( $constant, 'E_' ) ) {
    53 		if ( str_starts_with( $constant, 'E_' ) ) {
    54 			$core_errors[ $value ] = $constant;
    54 			$core_errors[ $value ] = $constant;
    55 		}
    55 		}
    56 	}
    56 	}
    57 
    57 
    58 	if ( isset( $core_errors[ $error['type'] ] ) ) {
    58 	if ( isset( $core_errors[ $error['type'] ] ) ) {