• Logs:
    PHP Warning: Invalid argument supplied for foreach() in /site_path/wp-content/plugins/pinterest-pin-it-button-on-image-hover-and-post/pinterest-pin-It-button.php on line 71

    Pinterest Pin It Button On Image Hover And Post 2.6
    WordPress 4.9.6
    PHP 7.1.18-1+ubuntu16.04.1+deb.sury.org+1

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support weblizar_support

    (@weblizar_support)

    Hi airathalitov,

    – We checked this issue
    – Really thank you for notifying us its a good feedback and we will fix this bug in next update
    – Please download this file and replace with old file path is [pinterest-pin-it-button-on-image-hover-and-post/pinterest-pin-It-button.php]
    – Download link

    Thanks.

    Plugin Author weblizar

    (@weblizar)

    Hi Airat,

    Thanks, for submitting bug report we will check this and fix ASAP in next update. (Within a day)

    Thanks

    Plugin Author weblizar

    (@weblizar)

    We have fixed the issue in version 2.6.1, update the plugin and give a try now.

    And let us know.

    Thanks

    I have v2.61 and I still have this error. I made a fix to solve this:

    Around line 72: replace

    <?php if(count($imags_urls) > 0) { foreach($imags_urls

    by

    <?php if((is_array($imags_urls)) && (count($imags_urls) > 0)) { foreach($imags_urls

    The fix you provided incorrectly uses “in_array”, did you mean “is_array” ??

    Error still present in v2.6.1!

    PHP Warning: Invalid argument supplied for foreach() in ...wp-content/plugins/pinterest-pin-it-button-on-image-hover-and-post/pinterest-pin-It-button.php on line 72

    We fixed this lines:

    $imags_urls = array();
    $imags_urls = get_option('exclude_pin_it_images');

    with

    $imags_urls = get_option( 'exclude_pin_it_images', array() );

    Plugin Support weblizar_support

    (@weblizar_support)

    Hi coriolis_too,performancefoundry

    – Please download this file and replace and update file path is [pinterest-pin-it-button-on-image-hover-and-post/pinterest-pin-It-button.php]

    – Download – link

    Thanks

    I might work, and it’s more or less the same as my fix, so I wont replace the file.

    But thanks for the quick response!

    Plugin Support weblizar_support

    (@weblizar_support)

    Hi,

    We will update it in next version

    Thanks

    Plugin Author weblizar

    (@weblizar)

    Thanks, @coriolis_too, and @performancefoundry for your contribution to fixing the issue.

    We implemented the below code into the plugin version 2.6.2 (not live yet):

    Line 68

    
    $imags_urls = get_option( 'exclude_pin_it_images', array() );
    

    Line 72

    
    if((is_array($imags_urls)) && count($imags_urls)) { foreach($imags_urls as $imags_url) { if($imags_url) {
    ...
    }
    

    The setting up return type = array() is a good idea at line 68.

    Please download the file from here – https://ufile.io/5s5ha

    Send us feedback for version 2.6.2 then we will live it, immediately.

    Thanks

    • This reply was modified 5 years, 9 months ago by weblizar.
    • This reply was modified 5 years, 9 months ago by Jan Dembowski.

    2.6.2 worked for my client suffering this issue. Thanks!

    -J

    Plugin Support weblizar_support

    (@weblizar_support)

    Hi techsurgeons,

    – If you like our support please review us.

    Thanks.

    Sure, will do, right after you release 2.6.2 so everyone else gets the fixed version.

    Plugin Support weblizar_support

    (@weblizar_support)

    Hi techsurgeons,

    – We will release new update 2.6.2 today so please update your plugin.

    Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP Warning: Invalid argument supplied for foreach()’ is closed to new replies.