Title: Clone Field Issue
Last modified: August 20, 2016

---

# Clone Field Issue

 *  [toppy](https://wordpress.org/support/users/toppy/)
 * (@toppy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/clone-field-issue/)
 * I’m noticing what seems to be a bug in Meta Box 4.2 on cloned fields.
 * Here’s how it works:
    1) Added a couple cloned fields. Saved. 2) Deleted all 
   the cloned fields and emptied out the final box. Saved. 3) Added info back to
   the field (either in the one box or multiples). Saved.
 * Result:
    rwmb_meta() now returns data with the array starting on 1 instead of
   0.
 * So, I have an array test that goes something like:
 *     ```
       if (! empty($ticket_array[0])) {
         do stuff
       } else {
         echo "There is nothing";
       }
       ```
   
 * This will return, “There is nothing” because array[0] will always be empty after
   the previous steps. Works normally if you haven’t deleted the fields previously.
 * Any fix for this or am I crazy? I could code around it be I’d rather a fix on
   the plugin end.
 * Thanks!
 * [http://wordpress.org/extend/plugins/meta-box/](http://wordpress.org/extend/plugins/meta-box/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [toppy](https://wordpress.org/support/users/toppy/)
 * (@toppy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/clone-field-issue/#post-3151639)
 * BTW. I notice the array can start beyond the 1st index as I have one field that
   is starting at index 3. Is this related to the DB fields? They aren’t fully deleting
   in some cases?
 * My temporary work around was to re-index the array with array_merge.

Viewing 1 replies (of 1 total)

The topic ‘Clone Field Issue’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/meta-box/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [toppy](https://wordpress.org/support/users/toppy/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/clone-field-issue/#post-3151639)
 * Status: not resolved