Title: [Plugin: Advertising Manager] Wrong datatype in Ad.php
Last modified: August 19, 2016

---

# [Plugin: Advertising Manager] Wrong datatype in Ad.php

 *  Resolved [pmcka](https://wordpress.org/support/users/pmcka/)
 * (@pmcka)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/)
 * Just upgraded to WP 2.9 and 3.4.9 of AM. Then after adding some new ads, I get
   the following warning in place of where the ad is supposed to be:
 * > Warning: in_array(): Wrong datatype for second argument in …/wp-content/plugins/
   > advertising-manager/lib/OX/Ad.php on line 140
 * Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [pmcka](https://wordpress.org/support/users/pmcka/)
 * (@pmcka)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1312988)
 * I tried to cast the second argument in that line as follows:
 * > if (!in_array($post->post_author, **(array)**$authors))
 * That removed the warning but the ad isn’t showing up now.
 *  [Fabricant](https://wordpress.org/support/users/fabricant/)
 * (@fabricant)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313129)
 * I had the same message. But I could make it work like this: I had to change the
   setting “By author” to one single author. When I set it to “all authors”, the
   error would show. But when I set it to one single author, it worked.
 *  [trillex](https://wordpress.org/support/users/trillex/)
 * (@trillex)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313150)
 * I am having the same issue but I only got one author, so it will always default
   to “All Authors”.
 *  [switzer](https://wordpress.org/support/users/switzer/)
 * (@switzer)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313162)
 * pmcka:
    Fabricant: trillex:
 * I have identified the issue, and will put out a new version tonight.
 * Cheers,
    Scott
 *  [trillex](https://wordpress.org/support/users/trillex/)
 * (@trillex)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313191)
 * I’ve updated it, which removes the error. I am, however, still unable to see 
   the ad. I’ve double confirmed my Adsense details, but even when pressing “Preview
   ad”, just a blank page shows.
 *  [trillex](https://wordpress.org/support/users/trillex/)
 * (@trillex)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313193)
 * Ignore what I wrote. My bad.
 *  [not2bug](https://wordpress.org/support/users/not2bug/)
 * (@not2bug)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313246)
 * After upgrading to WP 2.9 I got the warning message: Warning: fread() [function.
   fread]: Length parameter must be greater than 0 in /home2/XXX/public_html/wp-
   includes/pomo/streams.php on line 113;
    Deactivaning this plugin warning disappeard.
 *  [Krokkodriljo](https://wordpress.org/support/users/krokkodriljo/)
 * (@krokkodriljo)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313304)
 * I get that error message too
 * `Warning: fread() [function.fread]: Length parameter must be greater than 0 in/
   home/XXX/public_html/wp-includes/pomo/streams.php on line 113;`
 * Anyone?
 *  [switzer](https://wordpress.org/support/users/switzer/)
 * (@switzer)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313344)
 * not2bug:
    Krokkodriljo:
 * I am very interested in fixing this issue, but need more information. Could both
   of you please contact me via Skype (switzer) or your preferred IM?
 * Cheers,
    Scott
 *  [YoChen](https://wordpress.org/support/users/piedro/)
 * (@piedro)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313407)
 * Hello!
 * Did anyone find a solution to the “fread error” yet?
 * plz be so kind and post it here, I#m having the same problem, desperately searching
   for a solution or workaround myself.
 * The problem seems to be more common, but I can’t find any fixes even after extensive
   searching …
 * plz help!
 * thx,
    piedro
 *  [switzer](https://wordpress.org/support/users/switzer/)
 * (@switzer)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313408)
 * piedro:
 * ARe you on the latest version of Advertising Manager? This problem disappeared
   a few months ago with the latest version.
 * Cheers,
    Scott
 *  [YoChen](https://wordpress.org/support/users/piedro/)
 * (@piedro)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313409)
 * thx, Scott (switzer)!
 * Done! Disappeared!
 * thx, really good work!
    piedro

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘[Plugin: Advertising Manager] Wrong datatype in Ad.php’ is closed to 
new replies.

 * 12 replies
 * 7 participants
 * Last reply from: [YoChen](https://wordpress.org/support/users/piedro/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-advertising-manager-wrong-datatype-in-adphp/#post-1313409)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
