Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2009 at 03:28 UTC
Updated:
24 Jul 2009 at 12:09 UTC
What's the point of calling this function? Its return value is never check, so it seems to be no-op aside from some side effect inside drupal_function_exists().
Comments
Comment #1
dropcube commentedFrom the docs of
drupal_function_exists($function): If the function is not available, it tries to load the file where the function lives.This is the point of calling
drupal_function_exists, load the file where the callback function is.Comment #2
mattyoung commentedYes, thanks for the info. I just read up on this and the registry and realize what's going on.
I think the function name is wrong because of its side effect is its real purpose.
It should be called
drupal_load_function(), something like that so just reading the code we understand what's going on.Also I wish the name registry is more explicit. Registry is such a generic term. Makes looking up things about it very difficult.
It should be something like
code_registrylike thetheme_registry.I'm flipping this back to 'active' so maybe my suggestion can get some consideration.
Comment #3
berdirSee #332733: Implement a way to require that some functions are available