Title: Illegal String Offset
Last modified: August 22, 2016

---

# Illegal String Offset

 *  [MaxMatthew](https://wordpress.org/support/users/maxmatthew/)
 * (@maxmatthew)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/illegal-string-offset-9/)
 * This plugin was working fine, and much appreciated! But then suddenly I started
   getting Illegal String Offset messages:
 * Warning: Illegal string offset ‘form_id’ in /xxxxxxx/xxxxxxxxxx/xxxxxxxx/cfs_wp/
   wp-content/plugins/formidable-honeypot/formidable-honeypot.php on line 86
 * Can you help me fix this? I’d rather not use a Captcha
 * [https://wordpress.org/plugins/formidable-honeypot/](https://wordpress.org/plugins/formidable-honeypot/)

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

 *  [Victor Font](https://wordpress.org/support/users/vfontj/)
 * (@vfontj)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/illegal-string-offset-9/#post-5500678)
 * I was receiving the same error. The reason this error occurs is because PHP versions
   5.4 and above have strict warnings enabled by default. With strict warnings turned
   on, it will always trigger when there is a an attempt to access a value in an
   empty array. In this case, the developer is testing for a multi-page form and
   is accessing an array value that doesn’t exist for single-page forms. I added
   a check to see if the multi-page arrays exist. Now, it’s fair to warn you that
   I have not tested this on multi-page forms. I’ve only tested it on single-page
   forms and it stops the warning messages.
 *     ```
       //don't require if not on the last page
       			global $frm_next_page, $frm_vars;
       			if(!is_array($frm_vars) or !is_array($frm_next_page)) {
       				// do nothing
       			} else {
       				if((is_array($frm_vars) and isset($frm_vars['next_page']) and isset($frm_vars['next_page'][$values['form_id']])) or (is_array($frm_next_page) and isset($frm_next_page[$values['form_id']])))
       					return $errors;
       			}
       ```
   
 * This code wraps the developer’s original code in an if statement. Use at your
   own risk. Remember that if the developer releases another version of the plugin
   and still hasn’t fixed the warning message, this code will be overwritten.
 *  [sebo.marketing](https://wordpress.org/support/users/sebomarketing/)
 * (@sebomarketing)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-9/#post-5500803)
 * Where should the code be put in?
 *  [ddpweb](https://wordpress.org/support/users/ddpweb/)
 * (@ddpweb)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-9/#post-5500839)
 * Thank you SO much for posting this! Works great!
 * It goes on the file: formidable-honeypot.php
 * around line 89. Replaces the code like so
 *     ```
       //NEW CODE
       //don't require if not on the last page
       			global $frm_next_page, $frm_vars;
       			if(!is_array($frm_vars) or !is_array($frm_next_page)) {
       				// do nothing
       			} else {
       				if((is_array($frm_vars) and isset($frm_vars['next_page']) and isset($frm_vars['next_page'][$values['form_id']])) or (is_array($frm_next_page) and isset($frm_next_page[$values['form_id']])))
       					return $errors;
       			}
   
       		/*ORIGINAL CODE HERE
       		  //don't require if not on the last page
       			global $frm_next_page, $frm_vars;
       			if((is_array($frm_vars) and isset($frm_vars['next_page']) and isset($frm_vars['next_page'][$values['form_id']])) or (is_array($frm_next_page) and isset($frm_next_page[$values['form_id']])))
       				return $errors;
   
       		  	//if the honeypot wasn't incuded on the page
       			if(!isset($_POST['firstname_hnypt'])){
       		        return $errors;
       		    }
   
       		  */
       ```
   
 *  [linkhousemedia](https://wordpress.org/support/users/linkhousemedia/)
 * (@linkhousemedia)
 * [11 years ago](https://wordpress.org/support/topic/illegal-string-offset-9/#post-5500845)
 * Great fix. Thank you.
 * Someone should pick this back up. I wonder what the process would be for that.

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

The topic ‘Illegal String Offset’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/formidable-honeypot_8e6e46.svg)
 * [Formidable Honeypot](https://wordpress.org/plugins/formidable-honeypot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/formidable-honeypot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/formidable-honeypot/)
 * [Active Topics](https://wordpress.org/support/plugin/formidable-honeypot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/formidable-honeypot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/formidable-honeypot/reviews/)

 * 4 replies
 * 5 participants
 * Last reply from: [linkhousemedia](https://wordpress.org/support/users/linkhousemedia/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/illegal-string-offset-9/#post-5500845)
 * Status: not resolved