Skip to content

fix(php): fix compatibility issue with php 8.1#61

Open
kduret wants to merge 2 commits into
michael-donat:1.4.xfrom
kduret:patch-1
Open

fix(php): fix compatibility issue with php 8.1#61
kduret wants to merge 2 commits into
michael-donat:1.4.xfrom
kduret:patch-1

Conversation

@kduret

@kduret kduret commented Jul 28, 2022

Copy link
Copy Markdown

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);

Copy link
Copy Markdown

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

mabar commented Oct 21, 2022

Copy link
Copy Markdown
Collaborator

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

@JoffreyPoreeCoding

Copy link
Copy Markdown

No updates ? 😢

Comment thread src/VirtualFileSystem/Wrapper/FileHandler.php Outdated
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