Today I had a site on which I had migrated the database from another site, but didn't have all the same modules enabled.

When I went to /admin, I got an undefined function error for aes_decrypt, since the database said encryption was enabled, but the module was not actually present. salesforce_api_connect() must have been getting called on /admin, since the cache was being flushed.

I've attached a patch that checks for module_exists('aes') in the encryption wrapper functions.

Let me know if you think this makes sense to do.

Comments

EvanDonovan’s picture

StatusFileSize
new753 bytes

Sorry realized I had tabs instead of spaces in that patch.

kostajh’s picture

StatusFileSize
new713 bytes

I read somewhere that `function_exists` is faster than `module_exists` and anyway it will suffice for this. Also simplified the functions themselves. Thanks for this!

EvanDonovan’s picture

Looks good to me; won't mark RTBC though until actually I've gotten a chance to test.

kostajh’s picture

Automatically closed -- issue fixed for 2 weeks with no activity.