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

Json_Array: Convert database null to PHP null instead of empty array #538

Conversation

localheinz
Copy link

Related to doctrine/orm#968.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-828

We use Jira to track the state of pull requests and the versions they got
included in.

@localheinz
Copy link
Author

@Ocramius

🔔

@Ocramius
Copy link
Member

Ocramius commented Mar 4, 2014

@localheinz saw this - waiting for @deeky666's opinion first.

@@ -55,7 +55,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform)
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if ($value === null) {
return array();
return null;
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we can change this in 2.x as it surely breaks BC. @beberlei thoughts?

@deeky666
Copy link
Member

To preserve BC we cannot change that in 2.x unfortunately but instead have to address this in 3.0 as @guilhermeblanco pointed out in doctrine/orm#968.
Closing this for now and keeping the issue open on JIRA marking it for 3.0

@deeky666 deeky666 closed this Apr 24, 2014
@localheinz localheinz deleted the bugfix/nullable-json-array-mapped-to-empty-array branch April 24, 2014 16:08
@deeky666 deeky666 self-assigned this Jan 5, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2022
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.

None yet

4 participants