Problem with quote in category
-
Hello,
When a category contains a quote (like “It’s a category”), an sql error occurs when sending notifications.
By example :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'un Atelier...##%' or es_note_cat LIKE '%##Ils en pArlent...##%' or es_note_cat L' at line 1 pour la requête SELECT * FROM wp_es_notification where (es_note_status = 'Enable' or es_note_status = 'Cron') and ( es_note_cat LIKE '%##Carnet d'un Atelier...##%' or es_note_cat LIKE '%##Ils en pArlent...##%' or es_note_cat LIKE '%##PromO & ExpO##%') faite par edit_post, wp_update_post, wp_insert_post, wp_transition_post_status, do_action('transition_post_status'), WP_Hook- >do_action, WP_Hook->apply_filters, call_user_func_array, es_cls_sendmail::es_prepare_notification, es_cls_notification::es_notification_prepare
I’m planning, to solve this problem in my WP, to add an addslashes or better in db_notification.php line 77, in this instruction :
$sSql = $sSql . " es_note_cat LIKE '%##" . htmlspecialchars_decode($category[$i]->cat_name). "##%'";
David.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem with quote in category’ is closed to new replies.