Just testing things out, I tried:

jquery_ui_add('fadsjhskahdksasd');

And the code didn't complain. :P

I'm not actually sure what the 'right' behaviour for this would be. Obviously, I could drupal_set_message() an error right on the screen, but this needs to be more a clue to developers than it is to end users.

Comments

avpaderno’s picture

Looking at what drupal_add_css() does, I don't see any validation code. I would think that the same behavior should be kept from jquery_ui_add().

Like you said, it would not be clear what the module could do in that case, as a call to drupal_set_message() would be seen by the end user, and not by the developers. The only alternatives I could think of is to show the message if the user has the right permission (i.e. he administers the site), or to add an error message in the log.

webchick’s picture

Status: Active » Closed (won't fix)

Fair enough. :)