From:             camka at email dot ee
Operating system: windows
PHP version:      5.2.1
PHP Bug Type:     XMLRPC-EPI related
Bug description:  xmlrpc_is_fault shows warning if parameter is not an array

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 bug report at http://bugs.php.net/?id=40793&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40793&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40793&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40793&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40793&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40793&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40793&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40793&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40793&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40793&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40793&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40793&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40793&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40793&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40793&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40793&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40793&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40793&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40793&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40793&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40793&r=mysqlcfg

Reply via email to