Bug #71501 [Opn->Csd]: xmlrpc_encode_request ignores encoding option
Edit report at https://bugs.php.net/bug.php?id=71501&edit=1
ID: 71501
Updated by: nikic@php.net
Reported by: letrunghieu dot cse09 at gmail dot com
Summary: xmlrpc_encode_request ignores encoding option
-Status: Open
+Status: Closed
Type: Bug
Package: XMLRPC-EPI related
PHP Version: 7.0.0
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of letrunghieu.cse09@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ace71b4c5feb986dd6a4a231bd738d83b41826ab
Log: Fix bug #71501
Previous Comments:
------------------------------------------------------------------------
[2016-02-03 06:23:00] letrunghieu dot cse09 at gmail dot com
Test with PHP 7.0.0.
------------------------------------------------------------------------
[2016-02-03 05:56:11] letrunghieu dot cse09 at gmail dot com
Description:
------------
The xmlrpc_encode_request function ignores the value of encoding and
escaping output options if users do not use a explicit value for the
version option when calling.
Note: The xmlrpc extension must be loaded first.
Test script:
---------------
<?php
$params = 'Lê Trung Hiếu';
echo xmlrpc_encode_request('foo', $params, ['encoding' => 'UTF-8',
'escaping' => 'markup']);
Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>foo</methodName>
<params>
<param>
<value>
<string>Lê Trung Hiếu</string>
</value>
</param>
</params>
</methodCall>
Actual result:
--------------
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>foo</methodName>
<params>
<param>
<value>
<string>Lê Trung Hiếu</string>
</value>
</param>
</params>
</methodCall>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71501&edit=1
Thread (3 messages)