WordPress.org

Ready to get started?Download WordPress

Forums

Unique Names for Functions (4 posts)

  1. LoganSix
    Member
    Posted 7 years ago #

    Fatal error: Cannot redeclare get_categories() (previously declared in /blog/wp-includes/category.php:14) in /gallery/includes/functions.php on line 1120

    On the next update can you verify that all functions have unique names?
    The above mentioned function could be changed to get_wpCategories().

    I am trying to create a page on my site that will include the latest public new images. The page is located witin the WordPress structure, so both applications are calling different functions with the same name.
    I will also notify 4Images of this bug too.

    Thanks.

  2. LoganSix
    Member
    Posted 7 years ago #

    Fatal error: Cannot redeclare get_userdata() (previously declared in /blog/wp-includes/pluggable.php:61) in /forum/includes/functions.php on line 176

    This is also the case with the function called get_userdata() when going against a phpBB forum.

    I will notify phpBB of the bug also.

  3. whooami
    Member
    Posted 7 years ago #

    its not really a bug :) -- the developer team @ phpBB is prolly not going to be open to renaming a function theyve used for eons, literally. phpBB predates WordPress, fwiw. It was theirs first :P but you can always try.

    Its just a fact that occasionally youre going to run into these sorts of things if you use software running on the same platform and try to integrate it.

    http://www.google.com/search?q=get_userdata()&hl=en&pwst=1&start=180&sa=N

    There are hundreds of pages returned, a good deal of them are either related to WP or phpBB but you'll notice if you dig, that there other web-apps using that function name as well.

  4. LoganSix
    Member
    Posted 7 years ago #

    the developer team @ phpBB is prolly not going to be open to renaming a function theyve used for eons, literally. phpBB predates WordPress, fwiw. It was theirs first :P but you can always try.

    Well, since one of the things the developers ask us hackers to do is use unique naming for functions, you would expect them to take note and follow their own advice.

Topic Closed

This topic has been closed to new replies.

About this Topic