| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function __construct($string_code, $message, $wp_error_data = array(), $previous = null) |
||
| 33 | { |
||
| 34 | if (is_array($wp_error_data) |
||
| 35 | && isset($wp_error_data['status']) |
||
| 36 | ) { |
||
| 37 | $http_status_number = $wp_error_data['status']; |
||
| 38 | } else { |
||
| 39 | $http_status_number = 500; |
||
| 40 | } |
||
| 41 | parent::__construct( |
||
| 42 | $message, |
||
| 43 | $http_status_number, |
||
| 44 | $previous |
||
| 45 | ); |
||
| 46 | $this->wp_error_data = $wp_error_data; |
||
| 47 | $this->wp_error_code = $string_code; |
||
| 48 | } |
||
| 49 | |||
| 74 |