Strict warning: Declaration of views_plugin_argument_default_context::check_access() should be compatible with that of views_plugin_argument_default::check_access() in require_once() (line 11 of ../sites/all/modules/views_arg_context/plugins/views_plugin_argument_default_context.inc).

Normally I'd submit a patch, but this is just a one liner and don't feel like downloading the entire repo to create a one line patch.

On line 36:

function check_access(&$form) { needs to be changed to:

function check_access(&$form, $option_name) {

Comments

ericski’s picture

Status: Active » Reviewed & tested by the community

Seeing as how this has been open for about a year... I'm guessing the chances of getting this committed are slim, but I just wanted to throw my hat in and say I've independently found and fixed this issue in the same manner before coming to file a bug report myself.

tche082’s picture

StatusFileSize
new450 bytes

Made a patch for this so others can apply the fix

rafaqz’s picture

Issue summary: View changes
StatusFileSize
new872 bytes

Patch didn't apply for some reason, so I rolled another one.

darrellduane’s picture

Lets get this committed!

bleen’s picture

@DarrellDuane have you tested the latest patch? If so, can you describe the steps you used to test?

darrellduane’s picture

Honestly, I didn't actually use the patch provided, I directly edited my code to have $option_name as the second argument to the check_access() function on line 36.

The existing code was working fine on my PHP 5.3 system, but when I upgraded to php 5.5, I began getting this error message.
Once I did the net effect of this patch, it fixed the problem. I hope you're able to either directly apply the patch or edit your file and add this argument into the function.

I had to make a similar fix as described at: https://www.drupal.org/node/2176035#comment-9263555

darrellduane’s picture

Ok, I've had this problem on another site and had a chance to test patch #3 directly:

d@li views_arg_context$ patch -p1 < views_arg_context_check_access_update-1568086-3.patch 
patching file plugins/views_plugin_argument_default_context.inc
d@li views_arg_context$ pwd
/var/www/drupal/sites/all/modules/views_arg_context
d@li views_arg_context$ 

The error message has gone away once I applied this patch.

Lets get it committed!

damien_vancouver’s picture

another +1 for the patch in #3. It fixed this strict warning for me, which appeared after upgrading from PHP 5.3 to PHP 5.4.

vadym.kononenko’s picture

I've got "Warning: Missing argument 2 for views_plugin_argument_default_context::check_access()" message after patch was applied.
Updated patch fixes this warning. PHP 5.6.13