Skip to content

Commit

Permalink
Fix replacing of invalid XML characters
Browse files Browse the repository at this point in the history
Fixes #14157: Array to string conversion error on soap request with PHP
5.4
  • Loading branch information
rombert committed Nov 15, 2012
1 parent fbbf1d2 commit 7ae2d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/soap/mc_api.php
Expand Up @@ -305,7 +305,7 @@ function mci_null_if_empty( $p_value ) {
*/
function mci_sanitize_xml_string ( $p_input ) {

return preg_replace( '/[^\x9\xA\xD\x20-\xD7FF\xE000-\xFFFD\x{10000}-\x{10FFFF}]/u', '', $p_input);
return preg_replace( '/[^\x9\xA\xD\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]+/u', '', $p_input);
}

/**
Expand Down

3 comments on commit 7ae2d9a

@pkmishra-HEC
Copy link

@pkmishra-HEC pkmishra-HEC commented on 7ae2d9a Mar 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
I am still getting "Array to string conversion error on soap request with PHP" even though I updated as mentioned above in mc_api.php.
Using below versions:-
mantisbt-1.2.14
SquashTM-1.17.0
PHP-5.6.31

Below is the screen shot for reference

array to string conversion error

Please provide any other solution to resolve this issue

@dregad
Copy link
Member

@dregad dregad commented on 7ae2d9a Mar 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a support platform. Please file an issue in our bugtracker https://mantisbt.org/bugs/

@pkmishra-HEC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I raised this issue in the bugtracker https://mantisbt.org/bugs/.
reference bug id# 0024187
Please provide a solution for this. Thanks in advance.

Please sign in to comment.