Viewing 3 replies - 1 through 3 (of 3 total)
  • Anonymous User 9905372

    (@anonymized-9905372)

    Will look into it ASAP, because it isn’t an issue that can crash the plugin.

    Cheers and thanks for the notice.

    Hiya, having the same resulting E_WARNING but probably when no tweets could be loaded (API temporarily unavailable), the array $tweet_date_array will be empty and can’t be iterated with foreach, resulting in a E_WARNING.

    This should fix it though:

    --- twitget_orig.php    2014-01-02 08:33:54.182842200 +0100
    +++ twitget_mod.php     2014-01-02 08:33:46.322842200 +0100
    @@ -480,7 +480,7 @@
                                    <?php
                                            }
                                    ?>
    -                               <?php foreach($tweet_date_array as $c => $val) { ?>
    +                               <?php if (!empty($tweet_date_array)) { foreach($tweet_date_array as $c => $val) { ?>
                                    var date_val_<?php echo $c; ?> = <?php echo $val; ?>;
                                    <?php if($options["show_relative_time"]) { ?>
                                    var date_<?php echo $c; ?> = moment.unix(date_val_<?php echo $c; ?>).fromNow();
    @@ -488,7 +488,7 @@
                                    var date_<?php echo $c; ?> = moment.unix(date_val_<?php echo $c; ?>).format("<?php echo $moment_js_time; ?>");
                                    <?php } ?>
                                    jQuery(".<?php echo $c; ?>_tweet_date").html(date_<?php echo $c; ?>);
    -                               <?php } ?>
    +                               <?php } } ?>
                            });
                    </script>

    Couldn’t find the project on github so I was unable to submit this patch as a proposed bug-fix.

    Anonymous User 9905372

    (@anonymized-9905372)

    Fixed in 3.3.

    Cheers and thanks for the notice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning printed’ is closed to new replies.