dw250100785 / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

zp_api_common_post_request returns extra data #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.list($header, $content) = zp_api_common_post_request (
"/API.aspx?page=api-user-new",
                                array ( 'UserID' => $Id,
                                        'Password' => $Pass,
                                        'ApiKey' => $ApiKey ) );

What is the expected output? 
<ok />

What do you see instead?
6
<ok />
0

( So that's length of data, data, 0 on 3 separate lines ).

What version of the product are you using? On what operating system?
zeta prints api for PHP, version 1.0. Debian Lenny.

Please provide any additional information below.

Original issue reported on code.google.com by steve.ho...@gmail.com on 30 Dec 2009 at 10:05

GoogleCodeExporter commented 9 years ago
Note: this change has happened within the last couple of days, as all my old 
code has
just stopped working...

Original comment by steve.ho...@gmail.com on 31 Dec 2009 at 12:25

GoogleCodeExporter commented 9 years ago
I've modded the code in function zp_api_common_post_request to handle either...

743,752c743
<                 //$content = isset($result[1]) ? $result[1] : '';
<       $data = explode ( "\r\n", $result[1] ); 
<       if ( isset( $data[1] ) && strlen( $data[1] ) == hexdec ( $data[0] ) )
<       {
<                   $content = isset($data[1]) ? $data[1] : '';
<       }
<       else
<       {
<                   $content = isset($result[1]) ? $result[1] : '';
<       }
---
>                 $content = isset($result[1]) ? $result[1] : '';

If I could raise the priority of this, I would!!

Original comment by steve.ho...@gmail.com on 31 Dec 2009 at 12:45

GoogleCodeExporter commented 9 years ago
Looks like you are using an old version of the API.
We'll give you instructions how to replace the old code.

Original comment by zetapri...@gmail.com on 5 Jan 2010 at 10:58

GoogleCodeExporter commented 9 years ago

Original comment by zetapri...@gmail.com on 8 Jul 2010 at 11:04