File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public function getParameterValues($parameter, $data = [])
9797 }
9898
9999 // Determine if it's base64 encoded.
100- if (preg_match ('%^[a-zA-Z0-9/+]*={0,2}$% ' , $ data )) {
100+ if (is_string ( $ data ) && preg_match ('%^[a-zA-Z0-9/+]*={0,2}$% ' , $ data )) {
101101 $ decoded = base64_decode ($ data , true );
102102 if ($ decoded !== false ) {
103103 $ encoding = mb_detect_encoding ($ decoded );
@@ -108,9 +108,11 @@ public function getParameterValues($parameter, $data = [])
108108 }
109109
110110 // Determine if it's JSON encoded.
111- $ result = json_decode ($ data , true );
112- if (is_array ($ result )) {
113- $ data = $ result ;
111+ if (is_string ($ data )) {
112+ $ result = json_decode ($ data , true );
113+ if (is_array ($ result )) {
114+ $ data = $ result ;
115+ }
114116 }
115117
116118 // If it's not an array, no need to continue.
You can’t perform that action at this time.
0 commit comments