Skip to content

Instantly share code, notes, and snippets.

@manifestuk
Created March 30, 2012 07:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save manifestuk/2248282 to your computer and use it in GitHub Desktop.
Zoo Visitor "form array" bug fix.
// Starts around line 1100 of zoo_visitor_lib.php
foreach ($query->result_array() as $row)
{
/**
* @author Stephen Lewis
*
* Additional check to ensure that $_POST data is a string. Ensures ZV
* doesn't choke on DropDate, or any other "array" fields.
*/
$field_name = $row['field_name'];
$value = (isset($_POST[$field_name]) && is_string($_POST[$field_name]))
? $_POST[$field_name] : '';
/* End of modifications. */
$screen_name = str_replace('field_id_' . $row['field_id'], $value,
$screen_name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment