Title: Bugfix: illegal offset type
Last modified: March 1, 2017

---

# Bugfix: illegal offset type

 *  [Binternet](https://wordpress.org/support/users/binternet/)
 * (@binternet)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/bugfix-illegal-offset-type/)
 * on
    `includes/shortcodes.php` on `add_shortcode` function I’ve encountered ‘illegal
   offset type’ notice since for some reason `$tag` was an array and not a string.
 * You need to add this after `is_callable`
 *     ```
       if ( is_array( $tag ) ) {
        $tag = $tag[0];
       }
       ```
   
    -  This topic was modified 9 years, 1 month ago by [Binternet](https://wordpress.org/support/users/binternet/).

The topic ‘Bugfix: illegal offset type’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Binternet](https://wordpress.org/support/users/binternet/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/bugfix-illegal-offset-type/)
 * Status: not a support question