missing object_cache result in some warnings

Open
#81 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php, wordpress

Research direction

Start in advanced-cache.php around line 355, where object-cache.php is included, and review how the missing file affects the rest of the script. Confirm the expected behavior when object-cache.php is absent and whether the warning should be avoided; done should address the reported warnings without breaking Batcache activation.

Written by the indexing model from the issue text.

Description

Hi, in my vip dev environment I got these after activating batcache following the istructions:

Warning: include_once(/srv/wp-content/object-cache.php): failed to open stream: No such file or directory in /srv/wp-content/mu-plugins/batcache/advanced-cache.php on line 355

Warning: include_once(): Failed opening '/srv/wp-content/object-cache.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /srv/wp-content/mu-plugins/batcache/advanced-cache.php on line 355

reading advanched-cache.php seems like the absence of object-cache.php triggers a return at the half of the file...
why don't check if file exists before including, to avoid warning?
and why object cache is required for a large portion of the script, but it's not included in the plugin itself?
where can i find and download a stable version of it?

Dominant language
PHP
Stars
295
Forks
102
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/batcache

All issues in Automattic/batcache

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.