Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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) {
Comment | File | Size | Author |
---|---|---|---|
#9 | views_arg_context_check_access_update-1568086-4.patch | 984 bytes | vadym.kononenko |
#3 | views_arg_context_check_access_update-1568086-3.patch | 872 bytes | rafaqz |
#2 | removewarning.patch | 450 bytes | tche082 |
Comments
Comment #1
ericski CreditAttribution: ericski commentedSeeing 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.
Comment #2
tche082 CreditAttribution: tche082 commentedMade a patch for this so others can apply the fix
Comment #3
rafaqz CreditAttribution: rafaqz commentedPatch didn't apply for some reason, so I rolled another one.
Comment #4
DarrellDuane CreditAttribution: DarrellDuane commentedLets get this committed!
Comment #5
bleen CreditAttribution: bleen commented@DarrellDuane have you tested the latest patch? If so, can you describe the steps you used to test?
Comment #6
DarrellDuane CreditAttribution: DarrellDuane commentedHonestly, 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
Comment #7
DarrellDuane CreditAttribution: DarrellDuane commentedOk, I've had this problem on another site and had a chance to test patch #3 directly:
The error message has gone away once I applied this patch.
Lets get it committed!
Comment #8
damien_vancouver CreditAttribution: damien_vancouver commentedanother +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.
Comment #9
vadym.kononenko CreditAttribution: vadym.kononenko commentedI'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