Title: [Bugs fix] Two small code errors
Last modified: August 20, 2016

---

# [Bugs fix] Two small code errors

 *  Resolved [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/bugsfix-two-small-code-errors/)
 * Hiya,
 * Thanks for this plugin. Please find the below fixes as a compliment to your plugin.
   Hope they make it into the next version. Line numbers based on the current version
   1.31
 * Hope this helps!
 * Smile,
    Juliette
 * **************************
 * File: **class-wp-external-links.php**
 * Find _**line 331-333**_:
 *     ```
       $original_head = $matches[ 0 ];
       $content = str_replace( $original_head, $clean_head, $content );
       ```
   
 * _Replace with_:
 *     ```
       if( count( $matches ) > 0 ) {
       	$original_head = $matches[ 0 ];
       	$content = str_replace( $original_head, $clean_head, $content );
       }
       ```
   
 * Find _**line 392-393**_:
 *     ```
       // recover original <head> with attributes
       $content = str_replace( $clean_head, $original_head, $content );
       ```
   
 * _Replace with_:
 *     ```
       if( isset( $original_head ) ) {
       	// recover original <head> with attributes
       	$content = str_replace( $clean_head, $original_head, $content );
       }
       ```
   
 * [http://wordpress.org/extend/plugins/wp-external-links/](http://wordpress.org/extend/plugins/wp-external-links/)

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

 *  [Pi Zi](https://wordpress.org/support/users/freelancephp/)
 * (@freelancephp)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/bugsfix-two-small-code-errors/#post-3570870)
 * Hello Juliette, I am very offended by your post.
    No seriously, very good suggestions
   and I will put them on the list. Thanks! 😉
 *  Thread Starter [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/bugsfix-two-small-code-errors/#post-3570871)
 * Glad to be of service 😉

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

The topic ‘[Bugs fix] Two small code errors’ is closed to new replies.

 * ![](https://ps.w.org/wp-external-links/assets/icon-256x256.png?rev=2103983)
 * [External Links - nofollow, noopener & new window](https://wordpress.org/plugins/wp-external-links/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-external-links/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-external-links/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-external-links/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-external-links/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-external-links/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/bugsfix-two-small-code-errors/#post-3570871)
 * Status: resolved