| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public static function get_notification() { |
||
| 23 | if ( ! filter_has_var( INPUT_GET, 'xml_notification' ) && ! filter_has_var( INPUT_GET, 'xml_notifaction' ) ) { |
||
| 24 | // Also check for typo 'xml_notifaction', as this has been used in the past. |
||
| 25 | return; |
||
| 26 | } |
||
| 27 | |||
| 28 | $data = file_get_contents( 'php://input' ); |
||
| 29 | |||
| 30 | $xml = Core_Util::simplexml_load_string( $data ); |
||
| 31 | |||
| 32 | if ( is_wp_error( $xml ) ) { |
||
|
|
|||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | return NotificationParser::parse( $xml ); |
||
| 37 | } |
||
| 39 |