Title: preg_replace error
Last modified: August 24, 2016

---

# preg_replace error

 *  [Bryan Monzon](https://wordpress.org/support/users/bryanmonzon/)
 * (@bryanmonzon)
 * [11 years ago](https://wordpress.org/support/topic/preg_replace-error-1/)
 * In PHP 5.5 I’m seeing an error on lines 637 and 638 in the shortcode. Here’s 
   the specific error:
 * `Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback
   instead in /www/wp-content/plugins/wordpress-faq-manager/faq-manager.php on line
   637`
 * [https://wordpress.org/plugins/wordpress-faq-manager/](https://wordpress.org/plugins/wordpress-faq-manager/)

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

 *  [QXARE](https://wordpress.org/support/users/qxare/)
 * (@qxare)
 * [11 years ago](https://wordpress.org/support/topic/preg_replace-error-1/#post-6163279)
 * Hi, you can try to solve this by changing the plugin code (although it’s not 
   recommended and there could be a lot of other errors since the last update was
   2 years ago).
 * Maybe this helps, if you replace these 2 lines
 *     ```
       $faq_topic = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $faq_topic);
       $faq_tag = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $faq_tag);
       ```
   
 * with these
 *     ```
       $faq_topic = preg_replace('~&#x0*([0-9a-f]+);~i', function() { return chr(hexdec("\\1")); }, $faq_topic);
       $faq_tag = preg_replace('~&#x0*([0-9a-f]+);~i', function() { return chr(hexdec("\\1")); }, $faq_tag);
       ```
   
 *  Thread Starter [Bryan Monzon](https://wordpress.org/support/users/bryanmonzon/)
 * (@bryanmonzon)
 * [11 years ago](https://wordpress.org/support/topic/preg_replace-error-1/#post-6163317)
 * Thanks! I just commented the lines. I don’t really need that functionality right
   now.

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

The topic ‘preg_replace error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-faq-manager_e7e7e7.svg)
 * [SFN Easy FAQ Manager](https://wordpress.org/plugins/wordpress-faq-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-faq-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-faq-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-faq-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-faq-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-faq-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Bryan Monzon](https://wordpress.org/support/users/bryanmonzon/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/preg_replace-error-1/#post-6163317)
 * Status: not resolved