I'm using the custom PHP feature of CiviCRM to apply patches etc I can't do with a hook.
I have a custom version of CRM/Mailing/Info.php which causes problems when installing an extension. I get the (redacted) error ...
PHP Fatal error: Cannot redeclare class CRM_Mailing_Info in /custom-code-area/CRM/Mailing/Info.php on line 0, referer: https://example.org/civicrm/admin/extensions?action=add&id=nz.co.fuzion.accountsync&key=nz.co.fuzion.accountsync
When I remove that PHP file, all is well.
I see that civicrm_rules_civicrm_postProcess() in drupal/modules/civicrm_rules/civicrm_rules.module on line 132 has ...
Could that be the cause? Assuming this is called before the custom code is included.