Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#61088 closed defect (bug) (worksforme)

object-cache.php is loaded, but cache.php still attempts to define functions.

Reported by: daerimin's profile daerimin Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.5
Component: Cache API Keywords:
Focuses: Cc:


When /wp-content/object-cache.php is present and contains the appropriate functions, the following error is displayed:

Fatal error: Cannot redeclare wp_cache_add() (previously declared in [redacted]/wp-content/object-cache.php:32) in [redacted]/wp-includes/cache.php on line 44

There has been a critical error on this website.

Learn more about troubleshooting WordPress.

Note: I placed "ini_set('display_errors', 1);" in the object-cache.php to get the actual error to show.

Attachments (1)

object-cache.php (3.1 KB) - added by daerimin 3 months ago.

Download all attachments as: .zip

Change History (4)

3 months ago


#1 @TimothyBlynJacobs
3 months ago

  • Keywords reporter-feedback added

Hi @daerimin,

It looks like you're object cache file is not defining a wp_cache_init. This function is required.

#2 @daerimin
3 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

Apologies for taking up your time. That was the issue.

#3 @SergeyBiryukov
3 months ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted

No worries, thanks for the follow-up!

Note: See TracTickets for help on using tickets.