Skip to content
Snippets Groups Projects

Issue #3272884 by Aerzas: html_entity_decode(): Passing null to parameter #1...

Files
2
@@ -85,7 +85,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
@@ -85,7 +85,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
*
*
* Uses HTML-safe strings, with several characters escaped.
* Uses HTML-safe strings, with several characters escaped.
*/
*/
public function encode($data, string $format, array $context = []):string {
public function encode(mixed $data, string $format, array $context = []): string {
switch (gettype($data)) {
switch (gettype($data)) {
case "array":
case "array":
break;
break;
@@ -260,7 +260,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
@@ -260,7 +260,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
* @throws \League\Csv\Exception
* @throws \League\Csv\Exception
* @throws \League\Csv\Exception
* @throws \League\Csv\Exception
*/
*/
public function decode($data, string $format, array $context = []) {
public function decode(string $data, string $format, array $context = []): mixed {
$csv = Reader::createFromString($data);
$csv = Reader::createFromString($data);
$csv->setDelimiter($this->delimiter);
$csv->setDelimiter($this->delimiter);
$csv->setEnclosure($this->enclosure);
$csv->setEnclosure($this->enclosure);
Loading