equal
deleted
inserted
replaced
225 public function as_error() { |
225 public function as_error() { |
226 if ( ! $this->is_error() ) { |
226 if ( ! $this->is_error() ) { |
227 return null; |
227 return null; |
228 } |
228 } |
229 |
229 |
230 $error = new WP_Error; |
230 $error = new WP_Error(); |
231 |
231 |
232 if ( is_array( $this->get_data() ) ) { |
232 if ( is_array( $this->get_data() ) ) { |
233 $data = $this->get_data(); |
233 $data = $this->get_data(); |
234 $error->add( $data['code'], $data['message'], $data['data'] ); |
234 $error->add( $data['code'], $data['message'], $data['data'] ); |
235 |
235 |