Unexpected token
-
Hi,
I have a fresh clean WP install with the latest WPCF7 and it works ok. But when I add a
add_action("wpcf7_before_send_mail", "add_to_database");WPCF7 is stuck with the spinning icon. It gives the following error
<div class="ajax-error">Unexpected token < </div>My function add_to_database seems to work correctly as every item is saved in the table as expected.
How can I fix the unexpected token issue???
[edit] i enabled debugging and I see get this message:
[22-Mar-2016 08:57:38 UTC] PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /Applications/XAMPP/xamppfiles/htdocs/mydomain.com/wp-includes/wp-db.php on line 1127IN my function I have
$result = $wpdb->query($wpdb->prepare("INSERT INTO ......Regards
The topic ‘Unexpected token’ is closed to new replies.