Skip to content

Conversation

alejomoreira
Copy link

No description provided.

private function maskSensitiveProperties ($obj)

if(strcmp($prop->getName(), $sensitiveField->tagName) == 0) {
$prop->setValue($obj, preg_replace($inputPattern, $inputReplacement, $prop->getValue($obj)));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested this version, and this line needs the same fix you did on line 81.

Suggested change
$prop->setValue($obj, preg_replace($inputPattern, $inputReplacement, $prop->getValue($obj)));
$prop->setValue($obj, preg_replace($inputPattern, $inputReplacement, $prop->getValue($obj) ?? ''));

@resumeblaze
Copy link

I didn't run into this error while testing PHP8.2 support in our application. I will need to update our forked version. Thank you for sharing your changes.

I did see a deprecation notice that you can no longer dynamically declare a property and need to include private $sensitiveStringRegexes = NULL; on line 34 of lib/net/authorize/util/Log.php

/authorizenet/lib/net/authorize/util/Log.php:366
Creation of dynamic property net\authorize\util\Log::$sensitiveStringRegexes is deprecated

PHP8.2 Deprecation Notice

v2.0.4

@OGProgrammer
Copy link

+1 on this, curious if this would fix upto 8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants