forms icon indicating copy to clipboard operation
forms copied to clipboard

Regression introduced by #95 : ("Notice: Undefined offset: 0").

Open enthus1ast opened this issue 4 years ago • 0 comments

It seems my patch #95 introduced an regression: ("Notice: Undefined offset: 0"), when an uploaded file is absent in the form. What seems to work for me is:

changeing this:

if (is_array($value)) {
    $value = implode(', ', array_map(function ($entry) {
      return $entry[0];
    }, $value));
}

to:

if (is_array($value)) {
    $value = implode(', ', array_map(function ($entry) {
      if (is_array($entry) and count($entry) > 0) {
        return $entry[0];
      }
    }, $value));
}

i move on and test on the way and if it works properly make another PR.

enthus1ast avatar Jan 27 '22 11:01 enthus1ast