[phpxmlrpc] PhpXmlRpc Bugfix

Andrej Becker andrej.becker at aperto.de
Mon Mar 29 16:53:53 BST 2004


Dear Developers,

i tried to use your code (xmlrpc for php) and i think i found a little bug. Maybe it's not, then consider this mail as pointless.

The problem just occurred after i copied the files into my apache doc root and tried to run the bettydemo.php. I got several php
error messages which lead to some minor errors in the code (exact error messages: "Notice: Undefined index: stateno in
C:\apache\htdocs\xmlrpc\bettydemo.php on line 7" and "Notice: Undefined variable: stateno in C:\apache\htdocs\xmlrpc\bettydemo.php
on line 25").

This is only because somehow PHP doesnt recognise the demanded variable at this point. In my opinion, line 7 in the code must be

--- if ( isset($HTTP_POST_VARS["stateno"]) && $HTTP_POST_VARS["stateno"] != "" ) { ...

instead of

--- if ( $HTTP_POST_VARS["stateno"]!="" ) { ...



The same happens at line 25. I used this code

--- if ( !empty($stateno) ) {
---     $tmp_value = ${stateno};
--- } else {
---     $tmp_value = "";
--- }
--- print "<FORM  METHOD=\"POST\"><INPUT NAME=\"stateno\" VALUE='$tmp_value'><input type=\"submit\" value=\"go\"
name=\"submit\"></FORM><P>enter a state number to query its name";

instead of this:

--- print "<FORM  METHOD=\"POST\"><INPUT NAME=\"stateno\" VALUE=\"${stateno}\"><input type=\"submit\" value=\"go\"
name=\"submit\"></FORM><P>enter a state number to query its name";


Like i said, maybe it was not intended to make it work like that. Just wanted to inform you guys :)

Keep on your work, its just great :-)

Thanx a lot and have a nice day,


A. Becker (http://www.aperto.de)



_________________________________________
Aperto AG - In der Pianofabrik
A. Becker, Web Development
Email: mailto:a.becker at aperto.de
Chausseestraße 5, D-10115 Berlin-Mitte

Phone +49 (0)30 28 39 21-345 oder 0
Fax   +49 (0)30 28 39 21-29
Web   http://www.aperto.de




More information about the phpxmlrpc mailing list