// throw error if problem in database integrity

This commit is contained in:
mMarinetti committed 2012-01-24 15:09:56 +00:00
1 parent 90d27958c5
commit 244d88c7cc
1 file changed
+4
+4
View File
@@ -1558,6 +1558,10 @@ abstract class ModuleCore
$cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure']; $cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure'];
} }
} }
if (!isset($cache_permissions[$employee->id_profile][$id_module]))
throw new PrestaShopException('No access reference in table module_access for id_module '.$id_module.'.');
return (bool)$cache_permissions[$employee->id_profile][$id_module][$variable]; return (bool)$cache_permissions[$employee->id_profile][$id_module][$variable];
} }