Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.2 compatibility error fixes #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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