We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55c73e6 commit edbc132Copy full SHA for edbc132
1 file changed
src/Processor.php
@@ -371,7 +371,7 @@ public function matchParameterValue($match, $value)
371
}
372
373
// If the user does not have a WP privilege.
374
- if ($matchType == 'current_user_cannot' && is_scalar($matchValue) && function_exists('current_user_can') && !$this->mustUsePluginCall) {
+ if ($matchType == 'current_user_cannot' && is_scalar($matchValue) && function_exists('current_user_can') && function_exists('wp_get_current_user') && !$this->mustUsePluginCall) {
375
return @!current_user_can($matchValue);
376
377
0 commit comments