Je ne comprends pas pourquoi j'ai une notice dans la première création de $this->_data et pas dans la deuxième.
Code : Tout sélectionner
class stats
...
function process()
{
$this->_data = array();
$x = 232;
$y = 12;
$this->_data[$x][$y] = 'ok'; [b]//Pas de notice[/b]
$this->_data = $this->q_comments = $this->g_comments = array();
foreach ($this->reponses AS $question){
switch( $question->qtid ){
...
case 1: //'question':
if ($question->reponse > 0){
$this->_data[$question->question_id][$question->reponse]++; [b]//Notice: Undefined offset: 232[/b] !!!
}
...