Bug #17732: decode_request - reference vars depracated

From: Date: Wed, 12 Jun 2002 21:50:03 +0000
Subject: Bug #17732: decode_request - reference vars depracated
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10287@lists.php.net to get a copy of this message
From: ramses0@yahoo.com Operating system: Linux PHP version: 4.1.2 PHP Bug Type: XMLRPC-EPI related Bug description: decode_request - reference vars depracated Using the following demonstration RPC request, the function xmlrpc_decode_request (apparently) does not correctly update the passed in parameter $method_name, as described in the documentation on: http://xmlrpc-epi.sourceforge.net/main.php?t=php_api On a hunch, I tried changing the call to: xmlrpc_decode_request($xml, &$method); to use call-time pass by reference. It then worked, but call time pass by reference is depracated: Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of xmlrpc_decode_request(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. As an aside- it appears that you cannot "swallow" the warning by doing an $results = @decode( $a, &$b )... it stil gives the "warning, depracated" message. So that is possibly another bug. I have grepped through the source trees somewhat, but couldn't find much examples of functions directly affecting their passed in values (except "sort", which is pretty complicated). Thanks- --Robert (bugreport is mirrored at the sf.net pages, but that area appears to be mildly unmaintained) <?php $request = <<< END <?xml version="1.0"?> <methodCall> <methodName>greeting</methodName> <params> <param> <value><string>Dan</string></value> </param> </params> </methodCall> END; // <? /* ** DEBUGGING INFORMATION ** */ echo "<pre>"; echo "<b>Request:</b><br>"; print_r( $request ); // decode the request $method_name = ''; $stuff = xmlrpc_decode_request( $request, $method_name ); echo "<b>Results:</b><br>"; print_r( $stuff ); echo "<b>Method:</b><br>"; print_r( $method_name ); echo "</pre>"; ?> -- Edit bug report at http://bugs.php.net/?id=17732&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17732&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17732&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17732&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17732&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17732&r=support Expected behavior: http://bugs.php.net/fix.php?id=17732&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17732&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17732&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17732&r=globals

« previous php.bugs (#10287) next »