diff --git a/token.tokens.inc b/token.tokens.inc
index 2f8ec1b..848da87 100644
--- a/token.tokens.inc
+++ b/token.tokens.inc
@@ -218,7 +218,7 @@ function token_token_info() {
   $info['types']['url'] = array(
     'name' => t('URL'),
     'description' => t('Tokens related to URLs.'),
-    'needs-data' => 'path',
+    'needs-data' => 'url',
   );
   $info['tokens']['url']['path'] = array(
     'name' => t('Internal path'),
@@ -282,6 +282,13 @@ function token_token_info() {
  * Implements hook_tokens().
  */
 function token_tokens($type, $tokens, array $data = array(), array $options = array()) {
+  // If the token type specifics a 'needs-data' value, and the value is not
+  // present in $data, then throw an error.
+  $type_info = token_get_info($type);
+  if (!empty($type_info['needs-data']) && !isset($data[$type_info['needs-data']])) {
+    trigger_error(t('Attempting to perform token replacement for token type %type without required data', array('%type' => $type)));
+  }
+
   $replacements = array();
 
   $url_options = array('absolute' => TRUE);
