Problème d’exécution d'un fonction PHP

labkha Messages postés 4 Date d'inscription   Statut Membre Dernière intervention   -  
Mimiste Messages postés 1149 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

Quand je lance mon code j'obtiens cette alarme :

Warning: Illegal offset type inC:\Xampp\5.6.12\htdocs\seve_g3\private\library\FilesAnalysis\AnalyseByFileType\XlsxlistAssemblies.class.php on line 996

Dont voici le code:

private function manageDiversitySheetData(){
    // Get .ini settings & initialize
    $_aDiversityDataSettings = \General::getDataFromSettings('excel_input:Input_DIVERSITY:general_data', '_aGeneralData', $this->_aSettings);
    $_aDiversityAssemblies = array();
 
    // loop the Excel diversity sheet to get data
    foreach($this->_aInputDiversitySheet as $_iKey0 => $_aValue0){//Row
        if($_iKey0 >= $_aDiversityDataSettings['start_assembliesData'][0] && $_aValue0[0] != ""){
            $_aTempAssembly = array();
            foreach($_aValue0 as $_iKey1 => $_sValue1){//Columns
                // Compare current module cpn with module cpn in _aModuleData array to get module ID
                if($_iKey1 >= $_aDiversityDataSettings['start_constraints'][1] && $_sValue1 == "1"){
                    foreach($this->_aModuleData as $_iModuleID => $_aData){
                        if($_aData['customer_part_number'] == $this->_aInputDiversitySheet[$_aDiversityDataSettings['cpn'][0]][$_iKey1]){
                            $_aTempAssembly[] = $_iModuleID;
                        }//END if($_aData['customer_part_number'] == $this->_aInputDiversitySheet[$_aDiversityDataSettings['cpn'][0]][$_iKey1])
                    }//END foreach($this->_aModuleData as $_iModuleID => $_aData)
                }//END if($_iKey1 >= $_aDiversityDataSettings['start_constraints'][1] && $_sValue1 == "1")
            }//END foreach($_aValue0 as $_iKey1 => &$_sValue1)
            // Determines which is a RMT & OPT
            $_aTempAssembly = $this->getRMTAndOPT(implode($this->_sCombinationDelimiter, $_aTempAssembly));
            // fill final DiversityAssemblies array & Add refDPN & refBASE data
            $_aDiversityAssemblies[$_aTempAssembly['RMT']][$_aTempAssembly['OPT']] = array(
                                                                                        'refDPN' => $this->_aInputDiversitySheet[$_iKey0][$_aDiversityDataSettings['start_refDPN'][1]],
                                                                                        'refBASE' => $this->_aInputDiversitySheet[$_iKey0][$_aDiversityDataSettings['start_refBASE'][1]],
                                                                                    );
        }//END if($_iKey0 >= $_aDiversityDataSettings['start_assembliesData'][0] && !empty($_aValue0))
    }//END  foreach($this->_aInputDiversitySheet as $_iKey0 => &$_aValue0)
 
    // Merge Diversity Sheet Data in CPNAssemblies array
    $this->mergeDiversitySheetDataInCPNAssemblies($_aDiversityAssemblies);
 
}//END private function manageDiversitySheetData()


On me dit que ca pointe vers ce bout de code:

$_aDiversityAssemblies[$_aTempAssembly['RMT']][$_aTempAssembly['OPT']] = array(
    'refDPN' => $this->_aInputDiversitySheet[$_iKey0][$_aDiversityDataSettings['start_refDPN'][1]],
    'refBASE' => $this->_aInputDiversitySheet[$_iKey0][$_aDiversityDataSettings['start_refBASE'][1]]
       ,);


D'où peut bien provenir mon erreur ?

Merci de votre aide et bonne journée :)

EDIT : Ajout du LANGAGE dans les balises de code (la coloration syntaxique).
Explications disponibles ici : ICI

Merci d'y penser dans tes prochains messages.
A voir également:

1 réponse

Mimiste Messages postés 1149 Date d'inscription   Statut Membre Dernière intervention   206
 
Bonjour

Très probablement parceque sur la ligne mise en évidence, tu essaye d'utiliser un objet en tant que clé pour accéder à une valeur du tableau
0