WordPress.org

Ready to get started?Download WordPress

Forums

Wordbooker
parameter 1 Warning (3 posts)

  1. andytford
    Member
    Posted 1 year ago #

    I am seeing the following error on the public facing side of my site:

    Warning: substr() expects parameter 1 to be string, array given in /wp-content/plugins/wordbooker/wordbooker.php on line 1496

    Curious as to what's causing that and the workaround involved.

    Running WP 3.4.1 and WB Version 2.1.14

    Thanks in advance

    http://wordpress.org/extend/plugins/wordbooker/

  2. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    It's a warning not an error and you really shouldn't have warnings being dumped to the browser on a live site. I'll look at the code when I get home this evening...i

  3. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    OK the problem is this line:

    if (stristr(substr($imgsrc, 0, 8), '://') ===false) {

    for some reason the code is getting $imgsrc as an array and not a string. The error isn't occuring here which suggests its something unique to your site.

    How comfortable do you feel about editing code? If you are OK with that then could you find that line and add BEFORE it:

    var_dump($imgsrc);

    so it looks like :

    if ($imgsrc) {
        var_dump($imgsrc);
        if (stristr(substr($imgsrc, 0, 8), '://') ===false) {

    And got to the front end and see what it throws out before the error message - and post it in here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic