Skip to content

Keep NVARCHAR(MAX) length as -1#6251

Merged
derrabus merged 1 commit intodoctrine:3.7.xfrom
kitloong:feature/nvarchar
Jan 20, 2024
Merged

Keep NVARCHAR(MAX) length as -1#6251
derrabus merged 1 commit intodoctrine:3.7.xfrom
kitloong:feature/nvarchar

Conversation

@kitloong
Copy link
Copy Markdown
Contributor

@kitloong kitloong commented Jan 3, 2024

Q A
Type bug
Fixed issues #6038

Summary

As described in the mentioned issue, -0.5 from -1 / 2 will raise type error when trying to setLength

Argument #1 ($length) must be of type ?int, float given

public function setLength(?int $length): self

This PR check if length is -1 and keep it as is before perform division.

@kitloong kitloong marked this pull request as ready for review January 3, 2024 12:00
@derrabus derrabus changed the base branch from 4.0.x to 3.7.x January 20, 2024 12:11
@derrabus derrabus added this to the 3.7.3 milestone Jan 20, 2024
@derrabus derrabus merged commit 0febc80 into doctrine:3.7.x Jan 20, 2024
@derrabus
Copy link
Copy Markdown
Member

Thank you.

derrabus added a commit to derrabus/dbal that referenced this pull request Jan 20, 2024
* 3.7.x:
  Keep NVARCHAR(MAX) length as -1 (doctrine#6251)
derrabus added a commit to derrabus/dbal that referenced this pull request Jan 20, 2024
* 3.8.x:
  Keep NVARCHAR(MAX) length as -1 (doctrine#6251)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants