hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : [PHP] Wrong datatype for second argument
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

[PHP] Wrong datatype for second argument

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-08-2008, 01:17 PM
latheesan latheesan is offline
AsuraHosting.Com
 
Join Date: Jan 2005
Location: UK, London
Posts: 762

[PHP] Wrong datatype for second argument


Hello,

I am writing a PHP script for a control panel system for world of warcraft server. What i am trying to achieve is fairly simple.

The code I wrote stops working, as soon as i made it into a function. I keep getting this error :

Quote:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\WWW\htdocs\wow\cp\test_2.php on line 27

Warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\WWW\htdocs\wow\cp\test_2.php on line 28

Warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\WWW\htdocs\wow\cp\test_2.php on line 29

... and so on
This is my script : http://pastebin.com/m40bff675

Any idea why it's throwing that error? thanks in advance for any help.

__________________
:: www.AsuraHosting.com ::

Reply With Quote


Sponsored Links
  #2  
Old 04-08-2008, 01:27 PM
Adam-AEC Adam-AEC is offline
Web Hosting Master
 
Join Date: Feb 2003
Location: Canada
Posts: 935
Probably can't access the $config variable. Either pass it into the function or use global $config at the beginning of the function.

Reply With Quote
  #3  
Old 04-08-2008, 01:29 PM
Paul Paul is offline
Junior Guru
 
Join Date: Oct 2003
Location: Orlando, FL
Posts: 244
function getTalentSpec($class = "", $char_spells = "")
{
global $config;


Bring in the $config variable to the function or pass it as a argument

__________________
Paul

Reply With Quote
Sponsored Links
  #4  
Old 04-08-2008, 01:29 PM
latheesan latheesan is offline
AsuraHosting.Com
 
Join Date: Jan 2005
Location: UK, London
Posts: 762
omg... your right, it couldn't access the $config, no wonder it was failing. Thanks again

__________________
:: www.AsuraHosting.com ::

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Cloud Security Alliance’s 2012 Congress - The Internet and National Security Blog 2012-12-05 12:08:32
WHD 2012 -- How Web Hosts Can Prepare for the New TLDs with Thorsten Einig of OpenSRS Web Hosting News 2012-03-28 09:07:24
Overcoming security concerns from the desktop to the cloud with Symantec's Dan Nadir Web Hosting News 2012-02-16 15:30:17
WHIR TV - Rick from Neustar Discusses DDOS Threats and Defense Blog 2011-09-23 13:52:45
Web Host Go Daddy Says Outage Due to Software Upgrade Web Hosting News 2011-06-14 16:54:29


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?