• Great plugin…!!

    I have this problem in many movies… why is that?

    Thankyou !

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wp-content\plugins\imdb-connector\includes\functions.php on line 816

    Warning: Illegal string offset ‘title’ in C:\xampp\htdocs\wp-content\plugins\imdb-connector\includes\functions.php on line 397

    Warning: Illegal string offset ‘imdbid’ in C:\xampp\htdocs\wp-content\plugins\imdb-connector\includes\functions.php on line 398
    ……..

    https://www.ads-software.com/plugins/imdb-connector/

Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author thaikolja

    (@thaikolja)

    Can you give me one example movie where this happens and a screenshot of your IMDb Connector settings page?

    Thread Starter jcandsv

    (@jcandsv)

    Works fine: https://movinta.net/?p=1550

    Error: https://movinta.net/?p=1575
    The ID is “tt1532503”

    De https://www.imdb.com/title/tt1532503/

    Happens with many movies

    Thread Starter jcandsv

    (@jcandsv)

    Thread Starter jcandsv

    (@jcandsv)

    I delete the cache of IMDB Connector in the page settings and now the error happens in all pages… Apologize for my english … i speak spanish. It worked fine yesterday… but now since I want to add a new movie this error happens

    Maybe is the cache? Or something like that..

    Thank you

    Plugin Author thaikolja

    (@thaikolja)

    Okay, thanks. I found out that omdbapi.com is the problem, the JSON they give out is missing a ” sign, causing the whole format to break. I’ll let them know and release a quick fix in the meantime.

    Thread Starter jcandsv

    (@jcandsv)

    You make me know please!! And thanks for you support!

    Plugin Author thaikolja

    (@thaikolja)

    As I said, it’s a bug on omdbapi.com, they forgot a quote which makes it impossible for PHP to turn the JSON format into an array or object.

    I’ve done a quick fix. Please download it and test it and report back.

    Here’s the link: https://www.koljanolte.com/temp/8c2e0792.zip

    Thread Starter jcandsv

    (@jcandsv)

    Works !! But… when omdbapi.com fix the problem? I have to go back to the previous version?

    Plugin Author thaikolja

    (@thaikolja)

    No, my fix is flexible. If they fix it, it’ll still work. If not, let me know.

    Thread Starter jcandsv

    (@jcandsv)

    Thankyou! you are great!

    Plugin Author thaikolja

    (@thaikolja)

    You’re welcome. I’ll upload the official update in a few minutes. If there’re any bugs, please be so kind to let me know.

    Thread Starter jcandsv

    (@jcandsv)

    Okay ??

    Plugin Author thaikolja

    (@thaikolja)

    Quick notice: After I’ve sent them an e-mail, omdbapi.com has fixed the bug.

    Thread Starter jcandsv

    (@jcandsv)

    Great… thanks. I used the mktime for convert the time of IMDB connector to 00:00:00

    But I have an error when i pudated the plugin on the last version

    $minutes = $movie[“runtime”][“minutes”] . ” minutes “;
    /** We only want to keep the number */
    $minutes = preg_replace(“‘[^0-9]'”, “”, $minutes);
    /** Convert to time */

    $new_time = date(“H:i:s”, mktime( 0, $minutes));
    /** Output */
    echo “” . $new_time;

    Also… the rating in some posts does not appear “N/A”
    Thank you!

    Plugin Author thaikolja

    (@thaikolja)

    If you just want to display the time in the format H:i:s, it’d make a lot more sense to use the timestamp included in the runtime array. Here’s an example:

    $movie          = imdb_connector_get_movie("The Shining");
    $timestamp      = $movie["runtime"]["timestamp"];
    $formatted_time = date("H:i:s", $timestamp);
    
    echo "Runtime: $formatted_time";

    Regarding the rating: Can you give me one or two example movies where this happens and perhaps the code you’re using?

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Warning: Illegal string offset 'title' in wp-content\plugins…’ is closed to new replies.