CiviDiscount big red box error appears at the top of an event that uses discounts
Beside having that big ugly message at the top, does it work properly?

This is a WARNING, that can either be a missing validation of something from the developer, and could safely be ignored, or showing you the root of the problem.

You mention moving from joomla to drupal, the issue might be that the link between a user (in the CMS) and her contact (in the CRM) aren't properly linked anymore. Is this warning displayed when you are authenticated or to an anonymous user?

Anyway, if the discount works as expected, a quick workaround is to change the php configuration so it doesn't display NOTICE or WARNING online (I disable displaying them in production, mostly because they tend to be too verbose and disclose information like the path where I installed civi for instance that I'd rather keep private, for security reason)

yo can change that by changing the default value or add a error_reporting line on your civicrm_settings.php
http://php.net/manual/en/function.error-reporting.php

X+