danslo/ApiImport — pull request #25 by bragento (2014-11-03 12:38:55+00:00)
Title: create singleton only when module is enabled

Magento has a bug, where an exception is thrown, when you try to load a non existant singleton for the 2nd time.

The first time, the registry key is created with the value false.

The 2nd time, it will try to create the key again (because the condition is only if (!self::registry($registryKey)), but should be checking if the key is set) and raise an Exception.