mustardBees / cmb-field-select2

Select2 field type for Custom Metaboxes and Fields for WordPress
93 stars 46 forks source link

Warning: implode(): Invalid arguments #2

Closed jajouka79 closed 10 years ago

jajouka79 commented 10 years ago

Warning: implode(): Invalid arguments passed in C:\wamp\www\multisite-bands\wp-content\plugins\medusa_custom_meta_boxes\cmb-field-select2-master\cmb-field-select2.php on line 69

im getting this error when i use the select2 field and add multile values

mustardBees commented 10 years ago

Where you register the field, can you check you have the sanitization_cb as per the example:

array(
    'name' => 'Cooking time',
    'id' => $prefix . 'cooking_time',
    'desc' => 'Cooking time',
    'options' => array(
        '5' => '5 minutes',
        '10' => '10 minutes',
        '30' => 'Half an hour',
        '60' => '1 hour',
    ),
    'type' => 'pw_select',
    'sanitization_cb' => 'pw_select2_sanitise',
),
jajouka79 commented 10 years ago

thats great, works fine, thanks for your help :)

mustardBees commented 10 years ago

No worries!