Results 1 to 2 of 2

Thread: php issue

  1. #1
    stevie's Avatar
    Join Date
    May 2005
    Posts
    253

    Default php issue

    hey guys i have a issue with some other software wondered if you could help out



    Warning: in_array(): Wrong datatype for second argument in awcounter2.php on line 45

    this is line 45 of that file if (!in_array($uri, $_COOKIE['awc2p']))


    just need to check to make sure
    thank
    Last edited by stevie; 06-10-2006 at 08:11 AM.
    Keep smiling, it makes people wonder what you're up to

  2. #2
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    From php.net, http://cn2.php.net/manual/en/function.in-array.php

    Sometimes, you might want to search values in array, that does not exist. In this case php will display nasty warning:
    Wrong datatype for second argument in call to in_array() .

    In this case, add a simple statement before the in_array function:

    if (sizeof($arr_to_searchin) == 0 || !in_array($value, $arr_to_searchin)) { ... }

    In this case, the 1st statement will return true, omitting the 2nd one.
    If this does not work, or not what you are looking for - check the rest of the referenced URL above.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Blog issue !
    By oxy in forum General Troubleshooting
    Replies: 0
    Last Post: 06-19-2008, 01:30 PM
  2. this is a serious issue...
    By webbuddy in forum General Troubleshooting
    Replies: 7
    Last Post: 04-05-2007, 10:50 AM
  3. eCards in 5.5 issue
    By Toreador in forum Free Mod Exchange
    Replies: 0
    Last Post: 02-02-2007, 09:17 AM
  4. Serious issue in Dolphin !! HELP
    By afrogeek in forum Dolphin General Discussion v5.3 to v5.6.5
    Replies: 6
    Last Post: 01-20-2007, 01:41 AM
  5. Big Issue!!!
    By mr_cox in forum General Issues, Comments, Questions
    Replies: 4
    Last Post: 12-31-2006, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •