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

BA-383 Fix issue when a built in PHP function name is sent in the payload #183

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

DjellzeBllaca
Copy link
Contributor

No description provided.

@@ -65,7 +65,7 @@ protected function appendParameter(?int $groupKey, ?string $groupType, string $n
{
if (! is_null($value))
{
if (is_callable($value))
if (method_exists($this, $value))
Copy link
Contributor

Choose a reason for hiding this comment

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

we were checking if $value is a function, why is it like this now?

even if it returns true, further down you are executing $value itself, and not $this->{$value}

Copy link
Contributor Author

@DjellzeBllaca DjellzeBllaca Jul 18, 2024

Choose a reason for hiding this comment

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

Since, we couldn't find any case where this will be used, and there's nothing regarding this on docs I've removed the check. Tested the payments and everything seem to work fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the SDK, it seems that it has not been used, but this might have been used by a user, as I don't believe it was there without a reason

@DjellzeBllaca DjellzeBllaca changed the title BA-370 Fix issue when a built in PHP function name is sent in the payload BA-383 Fix issue when a built in PHP function name is sent in the payload Jul 18, 2024
@DjellzeBllaca DjellzeBllaca merged commit 6baa604 into develop Jul 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants