Community Documentation

Possible Cause: Two functions with the same name

Last updated September 25, 2009. Created by Francewhoa on September 25, 2009.
Log in to edit this page.

Possible Cause:
Because, EVERY file in themes/*/*.module and themes/*/*.theme is evaluated once, if a module is created by copying an existing module, and the module developer did not rename every function inside the module directory structure, you could have two functions (albeit in separate locations) with the same name.
The first function will be evaluated, and the second will throw an error.

Fix:

  1. Do a global search for the function name thats triggering the error.
  2. Rename or remove the duplicate function

Note: All files of the form *.module will be evaluated. Utilize an alternate extension like *.module.bak to prevent drupal from scanning the old file.

Page status

About this page

Drupal version
Drupal 4.5.x or older, Drupal 4.6.x, Drupal 4.7.x, Drupal 5.x, Drupal 6.x, Drupal 7.x
Audience
Developers and coders, Site administrators

Reference

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here