Skip to content

Reader cannot be init with a null param #97

Closed
@alexcode

Description

@alexcode

Initializing the Reader with a parsed array from the Parser as noted in the documentation doesn't work as Reader::load expects a string as function parameter.

Is this a bug or is it not supported anymore and the doc should be updated ?
Let me know so I can submit a PR to fix either the doc or the code and related unittest.

$c = new Parser($x);

$r = new Reader();
$r->setParsedFile($c->get());
$sender = $r->readEdiDataValue('UNB', 2);
$Dt = $r->readUNBDateTimeOfPreperation();

The below code will raise the following error.
TypeError: Argument 1 passed to EDI/Reader::load() must be of the type string, null given, called in /var/www/vendor/sabas/edifact/src/EDI/Reader.php on line 31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions