Correction pour les warnings

This commit is contained in:
Michael RICOIS 2012-01-02 16:55:50 +00:00
parent 01cf1a8848
commit dc2a686e0e

View File

@ -15,7 +15,7 @@ class SessionCiblage
public function __construct()
{
$session = new Zend_Session_Namespace('ciblage');
$this->valeur = $session->ciblage;
$this->valeur = empty($session->ciblage) ? array() : $session->ciblage;
if (isset($this->valeur['NB']['total'])){ $this->total = $this->valeur['NB']['total']; }
if (isset($this->valeur['NB']['insee'])){ $this->insee = $this->valeur['NB']['insee']; }
if (isset($this->valeur['NB'])){ unset($this->valeur['NB']); }
@ -69,7 +69,7 @@ class SessionCiblage
*/
public function getCritere($key)
{
if(in_array($key, $this->criteres) && in_array($key, $this->valeur)) {
if(in_array($key, $this->criteres) && array_key_exists($key, $this->valeur)) {
return $this->valeur[$key];
}
return null;