Skip to content

Commit edbc132

Browse files
Fixed: avoid a fatal error if the engine is incorrectly implemented.
1 parent 55c73e6 commit edbc132

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public function matchParameterValue($match, $value)
371371
}
372372

373373
// 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) {
374+
if ($matchType == 'current_user_cannot' && is_scalar($matchValue) && function_exists('current_user_can') && function_exists('wp_get_current_user') && !$this->mustUsePluginCall) {
375375
return @!current_user_can($matchValue);
376376
}
377377

0 commit comments

Comments
 (0)