climate icon indicating copy to clipboard operation
climate copied to clipboard

PHP Warning: preg_split() expects parameter

Open gamersalpha opened this issue 4 years ago • 0 comments
trafficstars

Hello i got many warnings i got an array to do in table in command line and i got this error :

PHP Warning:  preg_split() expects parameter 2 to be string, array given in /var/www/html/demo/mailToCSV/mail_to_csv/vendor/league/climate/src/TerminalObject/Basic/Table.php on line 113

Warning: preg_split() expects parameter 2 to be string, array given in /var/www/html/demo/mailToCSV/mail_to_csv/vendor/league/climate/src/TerminalObject/Basic/Table.php on line 113
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/demo/mailToCSV/mail_to_csv/vendor/league/climate/src/TerminalObject/Basic/Table.php on line 114

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/demo/mailToCSV/mail_to_csv/vendor/league/climate/src/TerminalObject/Basic/Table.php on line 114

so i got a classe with a method to show my table :

   /**
     * Get the value array
     * 
     * @return array 
     */
    public function getArrayGlobal()
    
    {
                return array(
                    "libelle"=>$this->getLibelle(),
                    "message"=>$this->getMessage(),
                    "arrayEntete"=> $this->getArrayEntete(),
                    "arrayDatas"=> $this->getArrayDatas(),
                    "cptTableau"=>$this->getCptTableau(),
                    "numTable"=>$this->getNumTable(),
                    "arrayTableHtml"=>$this->getArrayTableHtml()
                );

    }

    /**
     * Get the value array
     * 
     * @return void 
     */
    public function show_cmd_table()
    { 
        $climate = new League\CLImate\CLImate;           
        try {
            
            $climate->table(array($this->getArrayGlobal()));
        } catch (Throwable  $e) {
          //  echo 'Exception reçue : ',  $e->getMessage(), "\n";
        }
    }

what do u think is wrong please ?

for the result i got the table but with al warning

gamersalpha avatar Aug 26 '21 18:08 gamersalpha