Hi Nick & Roots Community,
I’m having trouble making the override work with Roots 6.5.0 and I’m getting the following PHP Warning:
Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/roots-wrapper-override/src/plugin.php on line 176
I’ve deactivated all my plugins just in case and the issue persists.
I dug through the code as best as I could and have found that moving the following assignment from line 44 to the beginning of the __construct function fixes this issue
self::$overrides = $overrides; // and setup our default overrides.
It is probably specific to my PHP setup but I have the same issue on my production server, so I suspect others might run into it as well. Generally, I can’t use a variable before I define it although I know in some environments that can be possible
Do let me know if there is something wrong with my setup and this in a non-bug
I’m still a n00b with server setup so maybe I messed something up (I recently switched from shared hosting to VPS and I’ve started messing with my local MAMP install as well )
Thanks,
Tamara