ZC 1.5.7 PHP 7.4
I just got done installing Numinix's Google recaptcha v3, and it seems to be working fine, but my log folder is filling up fast with this error:
Here is the entire code from class.nmx_recaptcha_v3.php:[03-Jun-2022 08:59:26 America/Boise] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; NuminixRecaptchaV3Observer has a deprecated constructor in /home1/redsauto/public_html/includes/classes/observers/class.nmx_recaptcha_v3.php on line 6
I know I need to modify lines 6, and 8 to change the constructor, but I am a mechanic, not a php master, so I am not exactly sure what to change it to that will make php happy.Code:<?php /** * Observer class used to verify request token upon requests * */ class NuminixRecaptchaV3Observer extends base { function NuminixRecaptchaV3Observer() { global $zco_notifier, $nmxRecaptcha; $zco_notifier->attach($this, $nmxRecaptcha->get_notifiers_to_check()); } function update(&$class, $eventID, $paramsArray) { global $error, $nmxRecaptcha; if(!$nmxRecaptcha->is_enable()) return $error; $valid = false; if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])){ $valid = $nmxRecaptcha->validate_recaptcha($_POST['g-recaptcha-response'], $nmxRecaptcha->get_notifier_message_class($eventID)); } if(!$valid) $error = true; return $error; } }


Reply With Quote
