Title: Error
Last modified: August 31, 2016

---

# Error

 *  [projectmunton](https://wordpress.org/support/users/projectmunton/)
 * (@projectmunton)
 * [10 years ago](https://wordpress.org/support/topic/error-785/)
 * Hi … looks like neat plugin 🙂
 * Just testing it out locally and got this fatal error message
 * “plugins/roasted-url-shortener/urlshortener.php on line 11”
 * [https://wordpress.org/plugins/roasted-url-shortener/](https://wordpress.org/plugins/roasted-url-shortener/)

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

 *  [Gahapati](https://wordpress.org/support/users/gahapati/)
 * (@gahapati)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/error-785/#post-7423083)
 * There’s a typo in `urlshortener.php` line 11, which incorrectly reads
 * > `require_once("urlshortnerdb.php");`
 * when it should in fact read
 * > `require_once("urlshortenerdb.php");`
 * (Note the missing letter ‘e’.)
 * Also, _Roasted Url Shortener_‘s minimum requirement is WP 4.4, not 3.0 as claimed.
 * Fortunately, though, all that is “wrong” is a missing function, which got introduced
   in WP 4.4, and which can easily be added to urlshortener.php, if your’re not 
   running WP 4.4 yet.
 * Before (or after) the first line of code, which correctly reads
 * > require_once(“urlshortenerdb.php”);
 * put the following ([taken from here](https://developer.wordpress.org/reference/functions/wp_parse_url/)):
 *     ```
       if (!function_exists('wp_parse_url')) {
       	function wp_parse_url( $url ) {
           $parts = @parse_url( $url );
           if ( ! $parts ) {
               if ( '/' == $url[0] && false !== strpos( $url, '://' ) ) {
                   if ( ! $parts = @parse_url( 'placeholder://placeholder' . $url ) ) {
                       return $parts;
                   }
                   unset( $parts['scheme'], $parts['host'] );
               } else {
                   return $parts;
               }
           }
   
           if ( '//' == substr( $url, 0, 2 ) && ! isset( $parts['host'] ) ) {
               $path_parts = explode( '/', substr( $parts['path'], 2 ), 2 );
               $parts['host'] = $path_parts[0];
               if ( isset( $path_parts[1] ) ) {
                   $parts['path'] = '/' . $path_parts[1];
               } else {
                   unset( $parts['path'] );
               }
           }
           return $parts;
       	}
       }
       ```
   
 * Other than that – I think _Roasted Url Shortener_ really is a great plugin!!
 *  [Gahapati](https://wordpress.org/support/users/gahapati/)
 * (@gahapati)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/error-785/#post-7423084)
 * I packaged the corrections/additions as `roasted-url-shortener 1.0.1`, which 
   you can [download from Dropbox here](https://dl.dropboxusercontent.com/u/15160078/roasted-url-shortener%201.0.1.zip).

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

The topic ‘Error’ is closed to new replies.

 * ![](https://ps.w.org/roasted-url-shortener/assets/icon-128x128.jpg?rev=1422866)
 * [Roasted Url Shortener](https://wordpress.org/plugins/roasted-url-shortener/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/roasted-url-shortener/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/roasted-url-shortener/)
 * [Active Topics](https://wordpress.org/support/plugin/roasted-url-shortener/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/roasted-url-shortener/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/roasted-url-shortener/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gahapati](https://wordpress.org/support/users/gahapati/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/error-785/#post-7423084)
 * Status: not resolved