Ask a Question related to PHP Bugs, Design and Development.
-
tony2001@php.net #1
#40793 [Opn->Bgs]: xmlrpc_is_fault shows warning if parameter is not an array
ID: 40793
Updated by: [email]tony2001@php.net[/email]
Reported By: camka at email dot ee
-Status: Open
+Status: Bogus
Bug Type: XMLRPC-EPI related
Operating System: windows
PHP Version: 5.2.1
New Comment:
The function is supposed to accept only arrays by design.
Previous Comments:
------------------------------------------------------------------------
[2007-03-13 12:41:37] camka at email dot ee
Description:
------------
xmlrpc_is_fault is supposed to accept a result returned by
xmlrpc_decode.
As xmlrpc_decode can return non-array value, xmlrpc_is_fault throws a
notice:
xmlrpc_is_fault() : Array argument expected
which is incorrect, as it is common to simply pass the decoded xml
response directly into is_fault() function to check, whether it has
been fault or not.
Reproduce code:
---------------
<?
var_dump(xmlrpc_is_fault(xmlrpc_decode('<?xml version="1.0"
encoding="utf-8"?><methodResponse><params><param><value><int> 2</int></value></param></params></methodResponse>',
'utf-8')));
Expected result:
----------------
bool(false)
Actual result:
--------------
Notice: PHPDocument8 line 2 - xmlrpc_is_fault()
[function.xmlrpc-is-fault]: Array argument expected
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40793&edit=1[/url]
tony2001@php.net Guest
-
#40793 [NEW]: xmlrpc_is_fault shows warning if parameter is not an array
From: camka at email dot ee Operating system: windows PHP version: 5.2.1 PHP Bug Type: XMLRPC-EPI related Bug description: ... -
#38974 [NEW]: array should throw warning
From: hendlerman at yahoo dot com Operating system: windows XP PHP version: 5.1.6 PHP Bug Type: Arrays related Bug... -
#38974 [Opn->Bgs]: array should throw warning
ID: 38974 Updated by: derick@php.net Reported By: hendlerman at yahoo dot com -Status: Open +Status: ... -
#23104 [Ver->Asn]: Default array parameter value
ID: 23104 Updated by: iliaa@php.net Reported By: mkong at intisoft dot com -Status: Verified +Status: ... -
Warning: Cannot use a scalar value as an array in
Hi all This has just started coming up on a site I run. I haven't changed anything, it just started happening. Unfortunately, it's an adult...



Reply With Quote

