WordPress.org

Ready to get started?Download WordPress

Forums

iTunes Affiliate Pro
[resolved] Creating default object from empty value (6 posts)

  1. DeezNotes
    Member
    Posted 1 year ago #

    Warning: Creating default object from empty value in /<wp_dir>/wp-content/plugins/itunes-affiliate-pro/itunes-affiliate-pro.php on line 154

    Just updated to 1.4 and now I'm getting the above error.

    http://wordpress.org/extend/plugins/itunes-affiliate-pro/

  2. DeezNotes
    Member
    Posted 1 year ago #

    Additional info: That warning message was displayed at the beginning of every post that had an iTunes Affiliate link associated with it.

    Reverting back to 1.3 resolved the issue.

  3. Jorge A. Gonzalez
    Member
    Plugin Author

    Posted 1 year ago #

    Might be an issue with DOMDocument.

    I am on vacation for another week. I will look into the issue when I get home.

  4. grid
    Member
    Posted 1 year ago #

    I was getting a similar error, only mine was saying the problem was on line 155.

    Anyway, I went in and changed that line:

    $doc->loadHTML(utf8_decode($text) );

    to the following:

    $decoded_text = utf8_decode($text);
        if ( $decoded_text == '' ) {
            return $doc->saveHTML();
        }
        $doc->loadHTML($decoded_text);

    Which fixed it right up.

    Thanks Jorge, for this great plugin!

  5. grid
    Member
    Posted 1 year ago #

    Note that I was also getting some errors about incorrect html, so I changed the loadHTML line once again to the following:

    $dom->strictErrorChecking = false;
        @$doc->loadHTML($decoded_text);

    This is in addition to the changes made previously.

  6. Jorge A. Gonzalez
    Member
    Plugin Author

    Posted 1 year ago #

    Just updated the plugin using your fixes @grind.

    Update plugin to version 1.5

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.