The intent here is to include the file in the addon folder. However in our case, we also have a boostrap/app.php file at the root of our theme (which bootstraps our framework).
What happens is that the require_once matches our file before it matches yours, breaking our site. From our end, we have renamed our app.php file to something else however I think it's worth being explicit with your require_once call by telling it to only look in the current directory:
This relates specifically to the "Members - Admin Access" plugin.
The following line includes a file called
bootstrap/app.php
: https://github.com/caseproof/members/blob/develop/addons/members-admin-access/addon.php#L3The intent here is to include the file in the addon folder. However in our case, we also have a
boostrap/app.php
file at the root of our theme (which bootstraps our framework).What happens is that the
require_once
matches our file before it matches yours, breaking our site. From our end, we have renamed ourapp.php
file to something else however I think it's worth being explicit with yourrequire_once
call by telling it to only look in the current directory:So instead of this:
You do this:
It's a simple change that is backwards compatible and just prevents issues like this from cropping up.