Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6699493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:42:06+00:00 2026-05-26T06:42:06+00:00

Full Error: in_array() [<a href=’function.in-array’>function.in-array</a>]: Wrong datatype for second argument in /var/www/vhosts/example.com/httpdocs/sites/example.com/themes/example/page.tpl.php on line

  • 0

Full Error:

in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /var/www/vhosts/example.com/httpdocs/sites/example.com/themes/example/page.tpl.php on line 22.

Relevant Code:

if (($_GET['nid']) && ($_GET['uid'] != '5')) :
    $arr = array("7916","7917","7996","7918","7990","7919","7921","7924","7925","7923","7922","8011");
    reset($arr);
    $nid = $_GET['nid'];
    // settype($nid, "integer"); 
elseif(($_GET['uid'] == '5') && ($is_front)):
    include("include_ad_front.php");    
endif;

if((in_array($nid, $arr)) && ($is_front) && (!$_GET['uid'])) {
    //code continues below...

Lines 3 and 5 were just my attemts to fix the problem. Line 10 is actually line 22 in this error and the one throwing the error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:42:07+00:00Added an answer on May 26, 2026 at 6:42 am

    I think I see your problem.

    You have the in_array stuff being called after you’ve done your first set of if..else checks. Now the first part of your if...else has the array being created, but not the second.

    Try moving the array somewhere before your first if...else instead of inside it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The full error I'm getting is this: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1,
See the full error here: http://notesapp.heroku.com/ I'm using DataMapper and dm-validations 0.10.2. No matter
Seems like cuke doesn't show the full error message (at least when problem occurs
you can view full source code here dpaste.com/hold/167199 Error: delete() takes exactly 2 arguments
How do I sort out (distinguish) an error derived from a disk full condition
I have a database with a table which is full of conditions and error
Can anyone help me with this error? alt text http://abbeylegal.com/downloads/parsererror.jpg full image here It
Currently, I'm trying to make a function that sorts a vector full of fighters
I need to write php code to identify common e-mail errors, like inbox full
Full disclaimer: I'm a CS student, and this question is related to a recently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.