Bug #71501 [NEW]: xmlrpc_encode_request has incorrect behavior

From: Date: Wed, 03 Feb 2016 05:56:14 +0000
Subject: Bug #71501 [NEW]: xmlrpc_encode_request has incorrect behavior
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199011@lists.php.net to get a copy of this message
From:             letrunghieu dot cse09 at gmail dot com
Operating system: 
PHP version:      7.0.2
Package:          XMLRPC-EPI related
Bug Type:         Bug
Bug description:xmlrpc_encode_request has incorrect behavior

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&#195;&#170; Trung Hi&#225;&#186;&#191;u</string>
  </value>
 </param>
</params>
</methodCall>

-- 
Edit bug report at https://bugs.php.net/bug.php?id=71501&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71501&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71501&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71501&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71501&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71501&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71501&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71501&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71501&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71501&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71501&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71501&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71501&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71501&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71501&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71501&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71501&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71501&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71501&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71501&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71501&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#199011) next »