show_untitled_items error

Occasionally, I get the following error message when I go to my Omeka page:

Fatal error: Cannot redeclare show_untitled_items() (previously declared in /omeka/themes/mytheme/custom.php:9) in /omeka/application/views/scripts/functions.php on line 17

I can then log into the admin site, and it seems to resolve itself.

If I delete the following from my custom.php file would this fix the problem permanently?

add_filter(array('Display', 'Item', 'Dublin Core', 'Title'), 'show_untitled_items');

function show_untitled_items($title)
    // Remove all whitespace and formatting before checking to see if the title
    // is empty.
    $prepTitle = trim(strip_formatting($title));
    if (empty($prepTitle)) {
        return '[Untitled]';
    return $title;

If your theme is one written by us, then you should be able to simply update it.

Otherwise, yes, you should be able to drop that section out of your custom.php file. In many cases, you may not need any content in custom.php at all if you don't have many "customizations."