Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
300
Merge Requests
300
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
0c8d7422
Commit
0c8d7422
authored
Aug 08, 2005
by
Steven Wittens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
#28464
: fix XMLRPC array vs. struct type-checking
parent
2a87b502
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
includes/xmlrpc.inc
includes/xmlrpc.inc
+1
-3
No files found.
includes/xmlrpc.inc
View file @
0c8d7422
...
...
@@ -36,7 +36,7 @@ function xmlrpc_value_calculate_type(&$xmlrpc_value) {
case
'integer'
:
return
'int'
;
case
'array'
:
return
range
(
0
,
count
(
$xmlrpc_value
->
data
)
-
1
)
==
array_keys
(
$xmlrpc_value
->
data
)
?
'array'
:
'struct'
;
return
range
(
0
,
count
(
$xmlrpc_value
->
data
)
-
1
)
==
=
array_keys
(
$xmlrpc_value
->
data
)
?
'array'
:
'struct'
;
case
'object'
:
if
(
$xmlrpc_value
->
data
->
is_date
)
{
return
'date'
;
...
...
@@ -64,7 +64,6 @@ function xmlrpc_value_get_xml($xmlrpc_value) {
return
'<double>'
.
$xmlrpc_value
->
data
.
'</double>'
;
break
;
case
'string'
:
/*** check this! this was htmlspecialchars, I changed to check_plain ***/
return
'<string>'
.
check_plain
(
$xmlrpc_value
->
data
)
.
'</string>'
;
break
;
case
'array'
:
...
...
@@ -78,7 +77,6 @@ function xmlrpc_value_get_xml($xmlrpc_value) {
case
'struct'
:
$return
=
'<struct>'
.
"
\n
"
;
foreach
(
$xmlrpc_value
->
data
as
$name
=>
$value
)
{
/*** check this! this was htmlspecialchars, I changed to check_plain ***/
$return
.
=
" <member><name>"
.
check_plain
(
$name
)
.
"</name><value>"
;
$return
.
=
xmlrpc_value_get_xml
(
$value
)
.
"</value></member>
\n
"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment