Skip to content

Fix private posts check for non-permitted user #39

New issue

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

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

Already on GitHub? # to your account

Merged
merged 6 commits into from
Oct 24, 2018
Merged

Conversation

athlan
Copy link
Owner

@athlan athlan commented Oct 24, 2018

This is a fix for issue #38

Scenario:

  • Given we have a private post
  • And we visit the link for provate post as non-authenticated user (no permissions)
  • Then the following error occurs:
Warning: Invalid argument supplied for foreach() in /var/www/html/web/wp/wp-content/plugins/custom-fields-permalink-redux/includes/class-wp-post-meta.php on line 38

Warning: array_key_exists() expects parameter 2 to be array, boolean given in /var/www/html/web/wp/wp-content/plugins/custom-fields-permalink-redux/includes/class-wp-post-meta.php on line 59

@athlan athlan self-assigned this Oct 24, 2018
@athlan athlan added this to the 1.5.0 milestone Oct 24, 2018
@codecov
Copy link

codecov bot commented Oct 24, 2018

Codecov Report

Merging #39 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##             master    #39   +/-   ##
=======================================
  Coverage       100%   100%           
- Complexity       53     54    +1     
=======================================
  Files             6      6           
  Lines           155    157    +2     
=======================================
+ Hits            155    157    +2
Impacted Files Coverage Δ Complexity Δ
includes/class-wp-request-processor.php 100% <100%> (ø) 20 <0> (+1) ⬆️

@athlan athlan merged commit 6e75e36 into master Oct 24, 2018
@athlan athlan deleted the feature/issue-38 branch October 24, 2018 19:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant