Support » Plugins » [Plugin: Advertising Manager] Wrong datatype in Ad.php

  • Resolved pmcka


    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)
  • 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.

    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.

    I am having the same issue but I only got one author, so it will always default to “All Authors”.


    I have identified the issue, and will put out a new version tonight.


    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.

    Ignore what I wrote. My bad.

    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.

    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;



    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?



    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!



    ARe you on the latest version of Advertising Manager? This problem disappeared a few months ago with the latest version.


    thx, Scott (switzer)!

    Done! Disappeared!

    thx, really good work!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Advertising Manager] Wrong datatype in Ad.php’ is closed to new replies.