Test du paramètre page

This commit is contained in:
Michael RICOIS 2009-11-17 17:32:42 +00:00
parent 45324fac61
commit 2eaf07bffe

View File

@ -100,8 +100,7 @@ function getSurveillance($page, $siret){
'dirigeants' => 'dirigeants',
);
$return = '';
$firephp->log($_SESSION,'SESSION');
if(preg_match('/'.$assocPageDroit[$page].'\b/i', $_SESSION['tabInfo']['droits']))
if(is_string($page) && array_key_exists($page, $assocPageDroit) && preg_match('/'.$assocPageDroit[$page].'\b/i', $_SESSION['tabInfo']['droits']))
{
if( preg_match('/voirsurv\b/i', $_SESSION['tabInfo']['pref']) &&
inSurveillance($assocPageSource[$page], $siret))