Commit f8c58623 authored by alexpott's avatar alexpott
Browse files

Issue #2314181 by roderik | hefox: Change drupal_static('name', whatever, TRUE) function comments.

parent 33a3ed6d
...@@ -1515,11 +1515,9 @@ function drupal_classloader_register($name, $path) { ...@@ -1515,11 +1515,9 @@ function drupal_classloader_register($name, $path) {
* @param $default_value * @param $default_value
* Optional default value. * Optional default value.
* @param $reset * @param $reset
* TRUE to reset a specific named variable, or all variables if $name is NULL. * TRUE to reset one or all variables(s). This parameter is only used
* Resetting every variable should only be used, for example, for running * internally and should not be passed in; use drupal_static_reset() instead.
* unit tests with a clean environment. Should be used only though via * (This function's return value should not be used when TRUE is passed in.)
* function drupal_static_reset() and the return value should not be used in
* this case.
* *
* @return * @return
* Returns a variable by reference. * Returns a variable by reference.
...@@ -1564,6 +1562,8 @@ function &drupal_static($name, $default_value = NULL, $reset = FALSE) { ...@@ -1564,6 +1562,8 @@ function &drupal_static($name, $default_value = NULL, $reset = FALSE) {
* *
* @param $name * @param $name
* Name of the static variable to reset. Omit to reset all variables. * Name of the static variable to reset. Omit to reset all variables.
* Resetting all variables should only be used, for example, for running
* unit tests with a clean environment.
*/ */
function drupal_static_reset($name = NULL) { function drupal_static_reset($name = NULL) {
drupal_static($name, NULL, TRUE); drupal_static($name, NULL, TRUE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment