Home › Forums › Themes Support › Claue › Error file
Tagged: Instagram php
- This topic has 2 replies, 2 voices, and was last updated 5 years, 9 months ago by Harry.
-
AuthorPosts
-
-
March 23, 2019 at 5:19 am #29860
In my error file there is an ongoing error last couple of days:
[22-Mar-2019 00:24:50 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 01:04:24 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 01:23:04 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 02:17:09 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 02:26:45 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 02:27:48 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 02:27:51 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 03:03:22 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 03:21:45 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 03:53:46 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 04:00:24 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 04:31:33 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:09:16 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:17:21 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:18:57 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:20:59 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:21:58 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:32:14 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 05:53:07 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 06:02:03 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 06:28:29 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 06:28:34 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 06:45:41 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 06:46:39 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 06:52:34 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 07:38:12 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 09:11:05 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 09:12:16 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 09:12:37 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 10:06:10 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 10:26:11 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 10:32:16 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 10:49:10 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 10:56:37 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 11:16:14 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 11:16:19 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 11:24:19 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 12:36:28 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 13:31:04 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 13:35:05 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 13:47:06 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 14:20:23 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 14:41:39 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 14:54:08 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 14:58:00 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 15:00:46 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 15:05:13 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 15:40:30 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 15:45:08 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 15:46:52 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 17:50:26 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 17:54:46 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 19:12:24 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 19:12:28 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 19:12:40 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 19:29:00 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 19:40:00 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 20:37:27 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 21:09:41 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 21:22:13 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81
[22-Mar-2019 22:09:49 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/realmccoy101/public_html/sexyleggingsusa.com/wp-content/plugins/claue-addons/includes/shortcodes/instagram.php on line 81 -
March 23, 2019 at 5:24 am #29861
This is what’s in that file:
LINE 81 is: foreach ( $items_as_objects as $item_object ) {
<?php
/**
* Instagram shortcode.
*
* @package ClaueAddons
* @since 1.0.0
*/// Prevent loading this file directly
defined( ‘ABSPATH’ ) || exit;if ( ! function_exists( ‘claue_addons_shortcode_instagram’ ) ) {
function claue_addons_shortcode_instagram( $atts, $content = null ) {
$output = $gutter_style = ”;extract( shortcode_atts( array(
‘user_id’ => ”,
‘username’ => ”,
‘link’ => ”,
‘access_token’ => ”,
‘limit’ => 12,
‘columns’ => 2,
‘size’ => ‘low’,
‘gutter’ => ”,
‘slider’ => ”,
‘items’ => 4,
‘autoplay’ => ”,
‘arrows’ => ”,
‘dots’ => ”,
‘class’ => ”,
), $atts ) );$classes = array( ‘jas-sc-instagram clearfix ‘ . $class );
$attr = array();if ( $slider ) {
if ( ! empty( $items ) ) {
$attr_slider[] = ‘”slidesToShow”: “‘ . $items . ‘”‘;
}
if ( ! empty( $autoplay ) ) {
$attr_slider[] = ‘”autoplay”: true’;
}
if ( ! empty( $arrows ) ) {
$attr_slider[] = ‘”arrows”: true’;
}
if ( ! empty( $dots ) ) {
$attr_slider[] = ‘”dots”: true’;
}
if ( is_rtl() ) {
$attr_slider[] = ‘”rtl”: true’;
}
if ( ! empty( $attr_slider ) ) {
$attr[] = ‘data-slick=\'{‘ . esc_attr( implode( ‘, ‘, $attr_slider ) ) . ‘,”responsive”:[{“breakpoint”: 1024,”settings”:{“slidesToShow”: 3}},{“breakpoint”: 480,”settings”:{“slidesToShow”: 1}}]’ .’}\”;
}
$classes[] = ‘jas-carousel’;
}if ( ! empty( $gutter ) ) {
$gutter_style = ‘style=”padding: ‘ . ( int ) $gutter / 2 . ‘px”‘;
$attr[] = ‘style=”margin: 0 -‘ . ( int ) $gutter / 2 . ‘px”‘;
}if ( $columns ) {
$classes[] = ‘columns-‘ . $columns;
}$output .= ‘
‘;
if ( ! empty( $user_id ) && ! empty( $access_token ) ) {
$api = ‘https://api.instagram.com/v1/users/’ . $user_id . ‘/media/recent/?access_token=’ . $access_token . ‘&count=’ . esc_attr( $limit );
$getphoto = wp_remote_get( $api );if ( ! is_wp_error( $getphoto ) ) {
$photos = json_decode( $getphoto[‘body’] );if ( $photos->meta->code !== 200 ) {
echo ‘<p>Incorrect user ID specified.</p>’;
}$items_as_objects = $photos->data;
$items = array();
foreach ( $items_as_objects as $item_object ) {
if ( $size == ‘thumbnail’ ) {
$src = $item_object->images->thumbnail->url;
$w = $item_object->images->thumbnail->width;
$h = $item_object->images->thumbnail->height;
} elseif ( $size == ‘low’ ) {
$src = $item_object->images->low_resolution->url;
$w = $item_object->images->low_resolution->width;
$h = $item_object->images->low_resolution->height;
} else {
$src = $item_object->images->standard_resolution->url;
$w = $item_object->images->standard_resolution->width;
$h = $item_object->images->standard_resolution->height;
}$items[] = array(
‘link’ => $item_object->link,
‘src’ => $src,
‘comments’ => $item_object->comments->count,
‘like’ => $item_object->likes->count
);
}if ( isset( $items ) ) {
foreach ( $items as $item ) {
$link = $item[‘link’];
$image = $item[‘src’];
$comments = $item[‘comments’];
$like = $item[‘like’];$output .= ‘
‘;
$output .= ‘‘;
$output .= ‘‘;
$output .= ‘<span class=”pr cw mgr10″><i class=”fa fa-heart-o mr__5″></i>’ . $like . ‘</span>’;
$output .= ‘<span class=”pr cw”><i class=”fa fa-comments-o mr__5″></i>’ . $comments . ‘</span>’;
$output .= ‘‘;
$output .= ‘‘;
}
}
if ( ! empty( $username ) && ! $slider ) {
$output .= ‘‘;
$output .= ‘‘ . esc_html__( ‘Find us on Instagram’, ‘claue-addons’ ) . ‘‘;
$output .= ‘‘ . esc_attr( $username ) . ‘‘;
$output .= ‘‘;
}
}
}
$output .= ‘‘;
// Return output
return apply_filters( ‘claue_addons_shortcode_instagram’, force_balance_tags( $output ) );
}
} -
March 23, 2019 at 10:01 am #29866
Hi,
Please try update plugin Claue Addons in Appearance > Install plugin.
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.