Browse Source

Correction de l'option d'option dans importer_csv. (corrige un bug d'import avec mailsubscribers)

v3
Matthieu Marcillaud 2 years ago
parent
commit
7575a02840
  1. 2
      inc/exporter_csv.php
  2. 2
      inc/importer_csv.php

2
inc/exporter_csv.php

@ -120,7 +120,7 @@ function inc_exporter_csv_dist($titre, $resource, $options = []) {
// support ancienne syntaxe
// inc_exporter_csv_dist($titre, $resource, $delim = ', ', $entetes = null, $envoyer = true)
if (is_string($options)) {
if (!is_array($options)) {
$args = func_get_args();
$options = [];
foreach ([2 => 'delim', 3 => 'entetes', 4 => 'envoyer'] as $k => $option) {

2
inc/importer_csv.php

@ -88,7 +88,7 @@ function inc_importer_csv_dist($file, $options = []) {
// support ancienne syntaxe
// inc_importer_csv_dist($file, $head = false, $delim = ',', $enclos = '"', $len = 10000, $charset_source = '')
if (is_string($options)) {
if (!is_array($options)) {
$args = func_get_args();
$options = [];
foreach ([1 => 'head', 2 => 'delim', 3 => 'enclos', 4 => 'len', 5 => 'charset_source'] as $k => $option) {

Loading…
Cancel
Save