Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep NVARCHAR(MAX) length as -1 #6251

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Conversation

kitloong
Copy link
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
72 of 73 checks passed
@derrabus
Copy link
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants