Fatal error: Cannot redeclare Patchwork\redefine() (previously declared in C:\Program Files\VertrigoServ\www\plugins\email_template\classes\antecedent\patchwork\Patchwork.php:17) in C:\Program Files\VertrigoServ\www\plugins\email_logs\classes\antecedent\patchwork\Patchwork.php on line 25
(My apologies again, I'd been working on a take-home assignment for a job interview for the past few days.)
I see that this might not work if the other copy of Patchwork is autoloaded at an unpredictable point in time. For now, I guess the only thing I can suggest is manually editing out the conflicting include statement for Patchwork. However, I'm already working on a more reliable fix.
As for your first response: running two copies of Patchwork simultaneously (if you really mean that) would be really difficult to accomplish. The preprocessing component (CodeManipulation) is the main obstacle here.
I guess the below question looks like a newbie PHP question. But I wanted to hear the solution from the developer of this great package.
I am developing a plugin for a CMS which uses Patchwork library. The CMS has another plugin using Patchwork.
Due to 2 declaration of same classes/functions, I am getting the fatal error as below.
Fatal error: Cannot redeclare Patchwork\redefine()
If I have to re-declare all classes/function to a new namespace, what will be the best approach? Using function_exist method will help?
The text was updated successfully, but these errors were encountered: