WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Advertising Manager] Wrong datatype in Ad.php (13 posts)

  1. pmcka
    Member
    Posted 4 years ago #

    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!

  2. pmcka
    Member
    Posted 4 years ago #

    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.

  3. Fabricant
    Member
    Posted 4 years ago #

    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.

  4. trillex
    Member
    Posted 4 years ago #

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

  5. switzer
    Member
    Posted 4 years ago #

    pmcka:
    Fabricant:
    trillex:

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

    Cheers,
    Scott

  6. trillex
    Member
    Posted 4 years ago #

    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.

  7. trillex
    Member
    Posted 4 years ago #

    Ignore what I wrote. My bad.

  8. not2bug
    Member
    Posted 4 years ago #

    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.

  9. Krokkodriljo
    Member
    Posted 4 years ago #

    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?

  10. switzer
    Member
    Posted 4 years ago #

    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

  11. piedro
    Member
    Posted 4 years ago #

    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

  12. switzer
    Member
    Posted 4 years ago #

    piedro:

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

    Cheers,
    Scott

  13. piedro
    Member
    Posted 4 years ago #

    thx, Scott (switzer)!

    Done! Disappeared!

    thx, really good work!
    piedro

Topic Closed

This topic has been closed to new replies.

About this Topic