From 091d2a571852db982742ca453f8e2dc0b52f0288 Mon Sep 17 00:00:00 2001 From: Joaquim d'Souza Date: Wed, 22 Nov 2023 18:30:31 +0100 Subject: [PATCH] fix: check wordfence is enabled before use --- web/app/themes/awasqa/src/gravity-forms.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/app/themes/awasqa/src/gravity-forms.php b/web/app/themes/awasqa/src/gravity-forms.php index 94d8a31..8948971 100644 --- a/web/app/themes/awasqa/src/gravity-forms.php +++ b/web/app/themes/awasqa/src/gravity-forms.php @@ -478,6 +478,11 @@ function scanFile($file, $patterns) return (bool) ($file['tmp_name'] ?? null); }); + // get virus patterns from WordFence + if (!class_exists("wfScanEngine")) { + return $validation_result; + } + // get virus patterns from WordFence $scan_engine = new \wfScanEngine(); $wp_version = \wfUtils::getWPVersion();