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

Fix datetime segment filter empty expression #10806

Closed
wants to merge 4 commits into from

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Jan 28, 2022

Q A
Bug fix? (use the a.b branch) [ ]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

If you use datettime segment filter and use empty, then edit page return

Internal Server Error - PHP Notice - Trying to access array offset on value of type null 
/app/bundles/LeadBundle/Form/DataTransformer/FieldFilterTransformer.php:58 at

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Crate segment with datetime and choose empty expression
  3. Save segment and try edit it
  4. You should see error on dev enviroment

image

@kuzmany kuzmany added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Jan 28, 2022
@kuzmany kuzmany linked an issue Jan 28, 2022 that may be closed by this pull request
@npracht npracht added the segments Anything related to segments label Jan 28, 2022
@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #10806 (520eb6f) into 4.x (d0307b4) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##                4.x   #10806   +/-   ##
=========================================
  Coverage     47.10%   47.10%           
- Complexity    34931    34932    +1     
=========================================
  Files          2091     2091           
  Lines        117271   117271           
=========================================
  Hits          55244    55244           
  Misses        62027    62027           
Impacted Files Coverage Δ
...le/Form/DataTransformer/FieldFilterTransformer.php 65.51% <0.00%> (ø)

mmarton
mmarton previously approved these changes Jan 30, 2022
Copy link
Contributor

@mmarton mmarton left a comment

Choose a reason for hiding this comment

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

tested, and can confirm the issue ant the fix

…rmer.php

Co-authored-by: mmarton <marton@webdream.hu>
@cla-bot cla-bot bot added the cla-signed The PR contributors have signed the contributors agreement label Jan 30, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jan 31, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@kuzmany kuzmany mentioned this pull request Feb 4, 2022
39 tasks
@kuzmany kuzmany added this to the 4.2 milestone Feb 9, 2022
@kuzmany kuzmany added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels Feb 14, 2022
@kuzmany
Copy link
Member Author

kuzmany commented Feb 15, 2022

Fixed by #8649

@kuzmany kuzmany closed this Feb 15, 2022
@kuzmany kuzmany removed this from the 4.2 milestone Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs cla-signed The PR contributors have signed the contributors agreement pending-test-confirmation PR's that require one test before they can be merged segments Anything related to segments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple areas of Mautic throw a 500 error
3 participants