*/
public function ifUserCreatedMaximumAllowedCompanies () {
// Get max allowed companies to found
- $maxFound = $this->getConfigInstance()->readConfig('max_allowed_companies_found');
+ $maxFound = $this->getConfigInstance()->getConfigEntry('max_allowed_companies_found');
// Now get a search criteria and set the user's name as criteria
$criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
// Default is that everyone is poor... ;-)
$hasRequired = false;
- // Get a points instance from registry
- $pointsInstance = Registry::getRegistry()->getInstance('points');
+ // Init instance
+ $pointsInstance = null;
+
+ try {
+ // Get a points instance from registry
+ $pointsInstance = Registry::getRegistry()->getInstance('points');
+ } catch (NullPointerException $e) {
+ // Instance not found in registry
+ // @TODO We should log this exception later
+ }
// Is there an instance?
if (is_null($pointsInstance)) {