Title: repeater setting value function
Last modified: December 4, 2018

---

# repeater setting value function

 *  Resolved [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/repeater-setting-value-function/)
 * Am I reading this code wrong? Is the value lost if not an array?
    In the `Kirki_Settings_Repeater_Setting`
   class:
 *     ```
       public function value() {
       	$value = parent::value();
       	if ( ! is_array( $value ) ) {
       		$value = array();
       	}
       	return $value;
       }
       ```
   
 * If the value is not an array, make it an empty array.
    Should that instead be`
   $value = (array) $value;` ?

Viewing 1 replies (of 1 total)

 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/repeater-setting-value-function/#post-10946897)
 * Thanks! Fixed in [https://github.com/aristath/kirki/commit/771d27cfebfff297bddca55d6005f90c1a5fed6c](https://github.com/aristath/kirki/commit/771d27cfebfff297bddca55d6005f90c1a5fed6c),
   will be included in v3.0.35 🙂

Viewing 1 replies (of 1 total)

The topic ‘repeater setting value function’ is closed to new replies.

 * ![](https://ps.w.org/kirki/assets/icon-256x256.jpg?rev=3518366)
 * [Kirki – Freeform Page Builder, Website Builder & Customizer](https://wordpress.org/plugins/kirki/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kirki/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kirki/)
 * [Active Topics](https://wordpress.org/support/plugin/kirki/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kirki/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kirki/reviews/)

## Tags

 * [repeater](https://wordpress.org/support/topic-tag/repeater/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/repeater-setting-value-function/#post-10946897)
 * Status: resolved