Title: error in functions.php
Last modified: August 30, 2016

---

# error in functions.php

 *  [saga1984](https://wordpress.org/support/users/saga1984/)
 * (@saga1984)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/)
 * I get this message:
 * Warning: preg_replace(): Compilation failed: nothing to repeat at offset 191 
   in /home/xxxxx/public_html/wp-content/themes/raindrops/functions.php on line 
   8712
 * At the top of this single post:
 * [http://www.sagaciousnewsnetwork.com/the-secret-for-undetectable-mind-control/](http://www.sagaciousnewsnetwork.com/the-secret-for-undetectable-mind-control/)
 * I noticed this error since the last theme update. I have not added any new plugins
   or changed code in child functions.php and are up to date on WP and Raindrops
   Theme.
 * Help fixing is appreciated. Thank you.

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

 *  Thread Starter [saga1984](https://wordpress.org/support/users/saga1984/)
 * (@saga1984)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/#post-6892193)
 * It had NOTHING to with the theme! Sorry for the bother. It was some code inside
   the single post. The admin should probably delete this thread. Thanks.
 *  Thread Starter [saga1984](https://wordpress.org/support/users/saga1984/)
 * (@saga1984)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/#post-6892202)
 * The error is back! It disappeared on the above single post but now has reappeared
   on this single post:
 * [http://www.sagaciousnewsnetwork.com/california-politicians-could-soon-be-forced-to-wear-logos-of-top-corporate-donors/](http://www.sagaciousnewsnetwork.com/california-politicians-could-soon-be-forced-to-wear-logos-of-top-corporate-donors/)
 * Perhaps it is the theme? Do you have any suggestions on what the problem might
   be and how to fix it? Thank you.
 *  Thread Starter [saga1984](https://wordpress.org/support/users/saga1984/)
 * (@saga1984)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/#post-6892211)
 * The error disappears when removing the hyperlink in the first 12-20 characters
   or so in the post. When I add the hyperlink back I get this message at top of
   post:
 * Warning: preg_replace(): Compilation failed: nothing to repeat at offset 101 
   in /home4/xxxxxxx/public_html/wp-content/themes/raindrops/functions.php on line
   8712
 * AND the hyperlink is missing when error message appears.
 * The error changed from:
 *  Warning: preg_replace(): Compilation failed: nothing to repeat at offset **191**
   in /home/xxxxx/public_html/wp-content/themes/raindrops/functions.php on line 
   8712
 * to
 * Warning: preg_replace(): Compilation failed: nothing to repeat at offset **101**
   in /home4/xxxxxxx/public_html/wp-content/themes/raindrops/functions.php on line
   8712
 * very strange…
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/#post-6892215)
 * Please Add PHP Code child theme / functions.php
 *     ```
       <?php
   
       	function raindrops_link_url_text_decode( $matches ) {
   
       		if( isset( $matches[1] ) && preg_match('!%!', $matches[1] ) ) {
   
       			$replace = urldecode( $matches[1] );
       			$replace = esc_html( $replace );
   
       			return preg_replace("|(>.*)?". $matches[1]."*?</a>|", "$1{$replace}$2", $matches[0] );
       		}
       		return $matches;
       	}
       ?>
       ```
   
 * Thank you.
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/#post-6892378)
 * Bug fixed
 * Sorry
 *     ```
       function raindrops_link_url_text_decode( $matches ) {
   
       		if( isset( $matches[1] ) &&  false !== strpos($matches[1], '%') ) {
   
       			$replace = urldecode( $matches[1] );
       			$replace = esc_html( $replace );
   
       			return preg_replace("|>". $matches[1]."</a>|", ">{$replace}</a>", $matches[0] );
       		}
       		return $matches[0];
       	}
       ```
   

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

The topic ‘error in functions.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/raindrops/1.700/screenshot.png)
 * raindrops
 * [Support Threads](https://wordpress.org/support/theme/raindrops/)
 * [Active Topics](https://wordpress.org/support/theme/raindrops/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/raindrops/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/raindrops/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [nobita](https://wordpress.org/support/users/nobita/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-functionsphp-5/#post-6892378)
 * Status: not resolved