Title: Problem on line 8984 in function.php
Last modified: August 22, 2016

---

# Problem on line 8984 in function.php

 *  Resolved [kaloyan.kostov](https://wordpress.org/support/users/kaloyankostov/)
 * (@kaloyankostov)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-on-line-8984-in-functionphp/)
 * Hello! Before my page tittle i have some paragraph –> Warning: Invalid argument
   supplied for foreach() in \raindrops\functions.php on line 8984.
    Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-on-line-8984-in-functionphp/#post-5736027)
 * This is Bug of Raindrops
 *  This error occurs if　you do not use all the sidebar widget.
 * Quick Fix
 * Add functions.php at top below code.
 *     ```
       function raindrops_get_pinup_widget_ids() {
   
       		$widgets = wp_get_sidebars_widgets();
       		$ids	 = array();
   
       		if ( isset( $widgets ) && is_array( $widgets )){
   
       			foreach ( $widgets as $key => $val_array ) {
   
       				if ( preg_match( '$sidebar$', $key ) ) {
   
       					foreach ( $val_array as $widget ) {
   
       						if ( preg_match( '$raindrops_pinup_entry_widget-([0-9]+)$', $widget, $regs ) ) {
   
       							$ids[] = absint( $regs[ 1 ] );
       						}
       					}
       				}
       			}
       		}
       		return $ids;
       	}
       ```
   
 * After the change, please set to be as follows
 *     ```
       <?php
       	function raindrops_get_pinup_widget_ids() {
   
       		$widgets = wp_get_sidebars_widgets();
       		$ids	 = array();
   
       		if ( isset( $widgets ) && is_array( $widgets )){
   
       			foreach ( $widgets as $key => $val_array ) {
   
       				if ( preg_match( '$sidebar$', $key ) ) {
   
       					foreach ( $val_array as $widget ) {
   
       						if ( preg_match( '$raindrops_pinup_entry_widget-([0-9]+)$', $widget, $regs ) ) {
   
       							$ids[] = absint( $regs[ 1 ] );
       						}
       					}
       				}
       			}
       		}
       		return $ids;
       	}
       /**
        * functions and constants for Raindrops theme
        *
        *
        * @package Raindrops
        * @since Raindrops 0.1
        */
       if ( !defined( 'ABSPATH' ) ) {
   
       	exit;
       }
       /**
        * include raindrops custom settings
       ```
   
 * This bug will be fix next update.
 * Thank you.
 *  Thread Starter [kaloyan.kostov](https://wordpress.org/support/users/kaloyankostov/)
 * (@kaloyankostov)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-on-line-8984-in-functionphp/#post-5736041)
 * Thank you so much.
 *  [James H. Peterson III](https://wordpress.org/support/users/jamespeterson941/)
 * (@jamespeterson941)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-on-line-8984-in-functionphp/#post-5736182)
 * Hello,
 * I’m afraid I do not understand where to insert these two sets of code.
 * Can you tell me which lines the codes should be inserted at?
 * Thank you.
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-on-line-8984-in-functionphp/#post-5736190)
 * Hi jamespeterson941
 * To resolved questions, additional post please do not from next time.
 * This error does not always occur at any time.
 * Your site, if you have not an error, you do not need to change.
 * New version that fixes this bug can be provided anymore for a while.
 * If you are in a hurry if, please download the latest version from the following
 * [https://github.com/tenman/raindrops/releases](https://github.com/tenman/raindrops/releases)
 * Thank you 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem on line 8984 in function.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/raindrops/1.700/screenshot.png)
 * raindrops
 * [Support Threads](https://wordpress.org/support/theme/raindrops/)
 * [Active Topics](https://wordpress.org/support/theme/raindrops/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/raindrops/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/raindrops/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [nobita](https://wordpress.org/support/users/nobita/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/problem-on-line-8984-in-functionphp/#post-5736190)
 * Status: resolved