Skip to content

Conversation

kduret
Copy link

@kduret kduret commented Jul 28, 2022

avoid substr(): Passing null to parameter #1 ($string) of type string is deprecated

{
$this->position(0);
$newData = substr($this->file->data(), 0, $newSize);
$newData = substr($this->file->data() ? $this->file->data() : '', 0, $newSize);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this fixes the issue. Maybe we could use null coalescing operator?

@mabar
Copy link
Collaborator

mabar commented Oct 21, 2022

It should be fixed in File by setting $data to '', call to File->size() would fail too

@JoffreyPoreeCoding
Copy link

No updates ? 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants