Title: Deprecated messages
Last modified: August 24, 2016

---

# Deprecated messages

 *  Resolved [ruslan.f](https://wordpress.org/support/users/ruslanf/)
 * (@ruslanf)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/)
 * I’ve got a message
    Deprecated: preg_replace(): The /e modifier is deprecated,
   use preg_replace_callback instead in /home/…/www/wp-content/plugins/image-zoom/
   image-zoom.php on line 464
 * [https://wordpress.org/plugins/image-zoom/](https://wordpress.org/plugins/image-zoom/)

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

 *  Plugin Author [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180864)
 * Could you test the just released version (1.8.3) ?
 *  Thread Starter [ruslan.f](https://wordpress.org/support/users/ruslanf/)
 * (@ruslanf)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180866)
 * With new wersion I’ve got
 *     ```
       stripslashes("<a href="//cutetorrent.info/wp-content/uploads/2015/05/2015-05-29_204413.png\""><img class="alignright wp-image-2510 size-medium" src="\"http://cutetorrent.info/wp-content/uploads/2015/05/2015-05-29_204413-300x117.png\"" alt="2015-05-29_204413" width="300" height="117"></a>")
       ```
   
 * insted images.
 *  Plugin Author [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180868)
 * arf … my bad !!!
 * I will release a urgent update
 *  Thread Starter [ruslan.f](https://wordpress.org/support/users/ruslanf/)
 * (@ruslanf)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180872)
 * Ok i fixed it my self…
    I’m new to php… but know some other programming languages
   xD
 * Just read some docs and here is fix
    replace line 464 with
 *     ```
       return preg_replace_callback(
       						$pattern_img,
       						function ($matches)
       						{
       							return stripslashes('<a '.$matches[2].' href=\"'.$matches[3].$matches[4].'\" class=\"gallery_colorbox\"'.$matches[5].'>'.$matches[6].'<img '.$matches[7].' src=\"'.$matches[8].$matches[9].'\" '.$matches[10].'></a>');
       						},
       						$matches[0]);
       ```
   
 * this actually works but code is not safe. Probably some validations on matches
   array should be done.
    And also you may delete line above `$replacement_img ='
   stripslashes("<a\2href=\"\3\4\" class=\"gallery_colorbox\"\5>\6<img\7src=\"\8\
   9\" \10>\11</a>")';`
 *  Plugin Author [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180874)
 * That is what I do on the 1.8.4
 * I have to handle also the next regexp but will be in 1.8.5
 *  Plugin Author [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180875)
 * OK …
    1.8.5 released … sorry for the issue that my plugin may have generated
 *  Thread Starter [ruslan.f](https://wordpress.org/support/users/ruslanf/)
 * (@ruslanf)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180877)
 * With new version got this messages
    `Notice: Undefined offset: 11 in /home/host1386731/
   cutetorrent.info/htdocs/www/wp-content/plugins/image-zoom/image-zoom.php on line
   464`
 *  Plugin Author [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180880)
 * … So sorry
 * Could you test with said pattern …
    `$pattern_img = '/(<a([^>]*?)href=["\']([
   ^"\']*[.])'.$this->image_type.'["\']([^>]*?)>((?:[^<]|<br)*)<img([^>]*?)src=["\']([
   ^"\']*[.])'.$this->image_type.'["\']([^>]*?)>((?:[^<]|<br)*?)<\/a>)/isU';`
 * I must admit I am not the best at regular expression
 *  Thread Starter [ruslan.f](https://wordpress.org/support/users/ruslanf/)
 * (@ruslanf)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180882)
 * with this regexp I don’t see any messages.
 *  Plugin Author [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180883)
 * seems good 🙂
 * Thanks for the testing

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

The topic ‘Deprecated messages’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/image-zoom_928080.svg)
 * [Image Zoom](https://wordpress.org/plugins/image-zoom/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-zoom/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-zoom/)
 * [Active Topics](https://wordpress.org/support/plugin/image-zoom/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-zoom/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-zoom/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/deprecated-messages/#post-6180883)
 * Status: resolved