I Posted my First Bug Report for Drupal
Being an early adopter is a pain! I posted my first Drupal bug report at http://drupal.org/node/507668 -- because of a simple (perhaps inadvertent) change in the PHP.
Today marked the release of a bug and security fix to Drupal, a new minor version we like to call version "6.13" but don't download it yet unless you need the security fix and don't want to patch your code file by file! And if you use Admin menu, which I mention below.
PHP functions can define parameters that act as local variables within the function. For example, the ability to clear the Drupal cache depends upon the following function in the system module:
function system_clear_cache_submit(&$form_state, $form) {
drupal_flush_all_caches();
drupal_set_message(t('Caches cleared.'));
}
That's how it used to look. Now it's brand new:
function system_clear_cache_submit($form, &$form_state) {
drupal_flush_all_caches();
drupal_set_message(t('Caches cleared.'));
}
The only difference is the order of the parameters $form and &$form_state. Note the ampersand before the $form_state variable, that means that the "local" parameter is actually a reference or pointer to the same variable in a global scope. That's a good thing! Really, as it allows for the variable to be modified by the function without having to pass information in the "return" statement — something this function doesn't even have!
But, there is a lovely user-contributed module outside of the core Drupal code called Admin menu, which contains a link to call the system_clear_cache_submit function and it used the old parameter order. Now, perhaps, the link could have been implemented differently, independent of the order of parameters in the system function. But I don't think that's the real problem.
Again, you don't have to download the upgrade, but you should unless you can patch the files with the security fixes. Or, download the new version, and hack either the admin menu or the core file... You can guess which hack I did!




