I am calling a custom access callback function on a Views path and am getting Access Denied.

After further investigation, I determined the issue is within the views_access function where it is calling the call_user_func_array function. The issue is only if your custom access callback does not have any arguments. In PHP versions below 5.3, it allows for you to pass in NULL for the $arguments, but with version 5.3, this fails giving the Access Denied for that path.

Patch to come in next comment.

Thanks,

Travis.

CommentFileSizeAuthor
#1 979046-views_access-2.patch590 bytestravist

Comments

travist’s picture

Status: Active » Needs review
StatusFileSize
new590 bytes

Here is the patch.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Works fine and looks fine.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.