This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Omnipay\FirstAtlanticCommerce\Message; |
||
4 | |||
5 | use Omnipay\Common\Message\AbstractResponse as BaseAbstractResponse; |
||
6 | use SimpleXMLElement; |
||
7 | |||
8 | abstract class AbstractResponse extends BaseAbstractResponse |
||
9 | { |
||
10 | /** |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
11 | * Seserializes XML to an array |
||
0 ignored issues
–
show
|
|||
12 | * |
||
0 ignored issues
–
show
|
|||
13 | * @param \SimpleXMLElement $xml SimpleXMLElement object. |
||
0 ignored issues
–
show
|
|||
14 | * |
||
0 ignored issues
–
show
|
|||
15 | * @return array data |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
0 ignored issues
–
show
|
|||
17 | protected function xmlDeserialize($xml) |
||
0 ignored issues
–
show
|
|||
18 | { |
||
0 ignored issues
–
show
|
|||
19 | $array = []; |
||
0 ignored issues
–
show
|
|||
20 | |||
21 | if (!$xml instanceof SimpleXMLElement) |
||
0 ignored issues
–
show
|
|||
22 | { |
||
0 ignored issues
–
show
|
|||
23 | $xml = new SimpleXMLElement($xml); |
||
0 ignored issues
–
show
|
|||
24 | } |
||
0 ignored issues
–
show
|
|||
25 | |||
26 | foreach ($xml->children() as $key => $child) |
||
0 ignored issues
–
show
|
|||
27 | { |
||
0 ignored issues
–
show
|
|||
28 | $value = (string) $child; |
||
0 ignored issues
–
show
|
|||
29 | $_children = $this->xmlDeserialize($child); |
||
0 ignored issues
–
show
|
|||
30 | $_push = ( $_hasChild = ( count($_children) > 0 ) ) ? $_children : $value; |
||
0 ignored issues
–
show
|
|||
31 | |||
32 | if ( $_hasChild && !empty($value) && $value !== '' ) |
||
0 ignored issues
–
show
|
|||
33 | { |
||
0 ignored issues
–
show
|
|||
34 | $_push[] = $value; |
||
0 ignored issues
–
show
|
|||
35 | } |
||
0 ignored issues
–
show
|
|||
36 | |||
37 | $array[$key] = $_push; |
||
0 ignored issues
–
show
|
|||
38 | } |
||
0 ignored issues
–
show
|
|||
39 | |||
40 | return $array; |
||
0 ignored issues
–
show
|
|||
41 | } |
||
0 ignored issues
–
show
|
|||
42 | } |
||
43 |