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

BUGFIX Call to a member function Categories() on null #39

Merged
merged 3 commits into from
Aug 26, 2022

Conversation

muskie9
Copy link
Member

@muskie9 muskie9 commented Aug 26, 2022

Resolves an issue where no blog selected causes a chained Categories() relation call to error when attempting to edit the block later in the cms.

I haven't been able to build a proper test case that demonstrates the fix, however in local testing the cms now loads if no Blog is selected on an existing block.

resolves #38

Resolves an issue where no blog selected causes a chained `Categories()` relation call to error when attempting to edit the block later in the cms.
@muskie9 muskie9 changed the base branch from 2.2 to 2.1 August 26, 2022 00:52
@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #39 (c1ad497) into 2.1 (2f3a0a5) will decrease coverage by 3.28%.
The diff coverage is 66.66%.

❗ Current head c1ad497 differs from pull request most recent head 29e80eb. Consider uploading reports for the commit 29e80eb to get more accurate results

@@             Coverage Diff              @@
##                2.1      #39      +/-   ##
============================================
- Coverage     85.10%   81.81%   -3.29%     
+ Complexity       14       13       -1     
============================================
  Files             1        1              
  Lines            47       44       -3     
============================================
- Hits             40       36       -4     
- Misses            7        8       +1     
Flag Coverage Δ
php ?
unittests 81.81% <66.66%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Elements/ElementBlogPosts.php 81.81% <66.66%> (-3.29%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@muskie9 muskie9 force-pushed the pull/emptyCategoriesOnNull branch from c000f2b to 29e80eb Compare August 26, 2022 01:58
@muskie9 muskie9 merged commit 8d96d96 into dynamic:2.1 Aug 26, 2022
@muskie9 muskie9 deleted the pull/emptyCategoriesOnNull branch August 26, 2022 02:00
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.

BUG element with no Blog selected will not load cms fields when visited later
1 participant