f00b4r / nusoap

:smirk: Fixed NuSOAP for PHP 5.6 - 8.2
https://f00b4r.github.io/nusoap/
320 stars 356 forks source link

Array To String conversion #7

Closed joshharington closed 6 years ago

joshharington commented 7 years ago

I am getting an error of Array to string conversion in lib/nusoap.php on line 1703

f3l1x commented 7 years ago

Thanks. I will take a look.

f3l1x commented 7 years ago

@joshharington Could you please provide more info? Which PHP version at first? :-)

yashari01 commented 7 years ago

Hello,i'm getting also error of Array to string conversion in lib/nusoap.php but on line 7481 i'm using php 7.1

f3l1x commented 6 years ago

@joshharington @yashari01 Could you please send a PR?

raphaelrosello commented 6 years ago

I'm also getting the same error on client call passing a multidimensional array. Sample below

$response = $client->call('Logon', [
          'Username' => 'user',
          'Password' => 'password'
    ]);

This is the format of the XML I'm suppose to pass.

<Logon>
    <logonRequest>
        <Username>user</Username>
        <Password>password</Password>
    </logonRequest>
</Logon>
worka commented 6 years ago

Hello! Too

Array to string conversion

/vendor/econea/nusoap/src/nusoap.php:7605

var_dump $k & $v

/vendor/econea/nusoap/src/nusoap.php:7603:string 'faultcode' (length=9)
/vendor/econea/nusoap/src/nusoap.php:7604:string 'soapenv:Server' (length=14)
/vendor/econea/nusoap/src/nusoap.php:7603:string 'faultstring' (length=11)
/vendor/econea/nusoap/src/nusoap.php:7604:string 'bla bla bla' (length=81)
/vendor/econea/nusoap/src/nusoap.php:7603:string 'detail' (length=6)
/vendor/econea/nusoap/src/nusoap.php:7604:
array (size=1)
  'Exception' => string '' (length=0)
f3l1x commented 6 years ago

Could you guys send a PR to master branch?

f3l1x commented 6 years ago

ping @Worka @raphaelrosello @joshharington

worka commented 6 years ago

I can`t install

Could not find a matching version of package ^0.9.6. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (dev).

f3l1x commented 6 years ago

Try


{
    "require": { "econea/nusoap: ^0.9.6" },
    "prefer-stable": true,
    "minimum-stability": "dev",
}
worka commented 6 years ago

Still could not switch to "^0.9.6" Switched to the "dev-master" Looked at the change. Yes, the reason for the mistake is eliminated. Everything works perfectly.

f3l1x commented 6 years ago

Thanks for testing it. @Worka

f3l1x commented 6 years ago
{
"require": {
    "econea/nusoap": "^0.9.6"
},
"minimum-stability": "dev",
"prefer-stable": true
}

I've fixed it now. Could you test new version?

worka commented 6 years ago

I was able to switch now. It works correctly, but how do I get this build now with the composer's "minimum-stability: stable" settings?

f3l1x commented 6 years ago

As soon as I tag it, it will be working. There's a prefer-stable option for that. It prefer tags over dev- builds.

f3l1x commented 6 years ago

https://github.com/econea/nusoap/releases/tag/v0.9.6

RYRDU commented 5 years ago

I am getting an error of Array to string conversion in lib/nusoap.php on line 3203

ezehurt commented 5 years ago

I am getting an error of Array to string conversion in lib/nusoap.php on line 3203

You need to change $err .= "$k: $v<br>"; TO

 if (is_array($v)) {
                        $this->debug("$k = " . json_encode($v));
                    } else {
                        $this->debug("$k = $v<br>");
                    }

The same error was solved on #37 https://github.com/econea/nusoap/commit/10ca8ff1a501232560795926bca25d945588484c#diff-25d902c24283ab8cfbac54dfa101ad31

SergioWiesner commented 5 years ago

Array to string conversion

i have the same error, and not is fixed.

i want make a pull request with the solution for fixed quickly.

this solution is perfect @ezehurt i like -> if (is_array($v)) { $this->debug("$k = " . json_encode($v)); } else { $this->debug("$k = $v
"); }

dbebawy commented 4 years ago

@f3l1x, Can you release a new version 0.9.7 with this fix? The current release 0.9.6 doesn't contain the fix.

f3l1x commented 4 years ago

Hi @dbebawy. Released.

https://github.com/econea/nusoap/releases/tag/v0.9.7

dbebawy commented 4 years ago

Worked like a charm. Thank you!

On Wed, Nov 20, 2019, 4:11 AM Milan Felix Šulc notifications@github.com wrote:

Hi @dbebawy https://github.com/dbebawy. Released.

https://github.com/econea/nusoap/releases/tag/v0.9.7

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/econea/nusoap/issues/7?email_source=notifications&email_token=AA3QQS6LJ4CQZPHQXAHLWZLQUT5MHA5CNFSM4DQDQEVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEERITOY#issuecomment-555911611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3QQS2MGDPQQIXPXB2FFCDQUT5MHANCNFSM4DQDQEVA .

paulmbaka commented 4 years ago

@f3l1x, could please support with [17-Jun-2020 13:49:05 UTC] PHP Notice: Array to string conversion in .......lib\nusoap.php on line 6130