help with an error: boolean given, array expeceted

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
5Systems
Forum Newbie
Posts: 4
Joined: Tue Mar 03, 2009 9:27 am

help with an error: boolean given, array expeceted

Post by 5Systems »

I am trying to figure out how to get/pass information from/to Sugarcrm. I am completely unfamiliar with soap, but I was doing the following tutorial from the this Wiki page: SOAP Intro and Practical Examples, URL here: http://www.sugarcrm.com/wiki/index.php? ... l_Examples and received the following error.

Warning: SoapClient::SoapClient() expects parameter 2 to be array, boolean given in E:\xampplite\htdocs\joomsugartest\integration.php on line 11

Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() [<a href='soapclient.soapclient'>soapclient.soapclient </a>]: Invalid parameters in E:\xampplite\htdocs\joomsugartest\integration.php: 11 Stack trace: #0 E:\xampplite\htdocs\joomsugartest\integration.php( 11): SoapClient->SoapClient('http://localhos...', true) #1 {main} thrown in E:\xampplite\htdocs\joomsugartest\integration.php on line 11

What I don't seem to understand in the tutorial is that it clearly states a Boolean value of true for the second parameter here, $client = new soapclient('http://localhost/SugarCE/soap.php?wsdl',true); but then give the error for an array expected, but Boolean given. Am I just missing something?

any help would be great, thanks.
5Systems
Forum Newbie
Posts: 4
Joined: Tue Mar 03, 2009 9:27 am

Re: help with an error: boolean given, array expeceted

Post by 5Systems »

Does any one have any idea what might be going on in the above post. from what I can see, the line from the tutorial $client = new soapclient('http://localhost/SugarCE/soap.php?wsdl',true); simply creates a new object called soapclient, and passes two parameters to it, What I can't seem to figure out, is why I get the above error when it specifically has a Boolean data-type for the second parameter. Also, the notes or explanation on what is going on, is as follows: Instantiate the object with two parameters, the Sugar instances WSDL location and (FIXME)??? . I seem to get lost on the (FIXMEE)???, what is that, is that the author saying, this is broke and I need some one to fixme or am I just a moron?

Also does anyone know of a better tutorial to work with soap and SugarCRM by chance?
kalpesh
Forum Commoner
Posts: 54
Joined: Sun Sep 21, 2008 5:04 am

Re: help with an error: boolean given, array expeceted

Post by kalpesh »

hi ssystems,
I also get the same error.
Can u solve that error.
I am struck here.
I u know tell me .
Any help will be greatly appreciated.
Post Reply