Skip to content

php 7.4 - Deprecated: implode(): Passing glue string after array is deprecated. #926

@trane77

Description

@trane77

Hi,

I received this warning after doing an insert:

Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in <myfolder>/vendor/joshcam/mysqli-database-class/MysqliDb.php on line 1838

This is the stack trace, regarding MysqliDb:

ID time ? name location
6 0.2261 1699456 MysqliDb->_buildInsert( ) .../MysqliDb.php:816
7 0.2261 1699512 MysqliDb->_buildQuery( ) .../MysqliDb.php:1523
8 0.2261 1699512 MysqliDb->_buildInsertQuery( ) .../MysqliDb.php:1562
9 0.2261 1700848 implode ( ) .../MysqliDb.php:1838

I'm not trying to insert any fancy data structure, is just a simple associative array:

            $data = [
              'Nome'               => $nome,
              'Cognome'            => $cognome,
              'ragSociale'         => $ragSociale,
              'DataNascita'        => $dnascita_mysql,
              'LuogoNascita'       => $lnascita,
              'Nazionalita'        => $naz,
              'RagFiscale'         => $rfisc,
              'CodiceFiscale'      => $cfisc,
              'PIva'               => $piva,
              'Indirizzo'          => $indirizzo,
              'Civico'             => $civico,
              'Cap'                => $cap,
              'Localita'           => $localita,
              'Provincia'          => $provincia,
              'Tel'                => $tel,
              'Cel'                => $cel,
              'email'              => $email,
              'IBAN'               => $iban,
              'intestatario'       => $intestatario,
              'AgenziaID'          => $agencyID,
              'AgencyName'         => $agencyName,
              'ruoloID'            => $roleID,
              'roleName'           => $roleName,
              'SponsorID'          => $sponsorID ?: NULL,
              'SponsorName'        => $sponsorName,
              'dataRegistrazione'  => $data_mysql,
              'dataInizioRapporto' => $dataInizio_mysql,
              'Note'               => $note,
              'photo'              => '../Immagini/user.jpg'
            ];

The insert completes without problems, all data is in place. Anyway I think that this must be handled before further php updates, maybe in the future it can block the correct functioning of MysqliDb.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions