Search code examples
phpnusoap

How to pass apostrophe (') in NuSOAP?


I am trying to pass an argument containing apostrophe character to function call but apparently it is being stripped out. Here's what I am doing:

$input = array(
  'kod_modelu' => "187'",
  'nr_nadwozia' => '00552889'
);

$result = $client->call('certyfikat_gwarancji_dane_pobierz', $input);
var_dump($result);

And in output I'm getting:

'kod_modelu' => string '187' (length=3)
'nr_nadwozia' => string '00552889' (length=8)

(I am repeating input in output and apostrophe is being stripped out).

How can I solve this?

EDIT: Here's a code to reproduce the issue: Pastebin


Solution

  • Ok, case closed.

    PHP 5.2.6 is the issue (referring to bugs.php.net). Upgrading to the latest version of 5.2.x branch solves the problem.