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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

{
$this->serviceList->appendParameter($value($groupKey, $groupType));

Expand Down
Loading