Skip to content

Remove type parameter - #1305

Open
PGijsbers wants to merge 2 commits into
developfrom
remove-type-parameter
Open

Remove type parameter#1305
PGijsbers wants to merge 2 commits into
developfrom
remove-type-parameter

Conversation

@PGijsbers

Copy link
Copy Markdown
Contributor

Stacked on #1304.

Allows arbitrary number of arguments to v1 functions, as this function is called by Code Igniter and the values passed depends on how the function is accessed. The values are never actually used, so we could also omit them, but that would raise errors if we were to ever update to PHP 8+.

When deployed with the services docker compose making a request curl http://localhost:8080/data/v1 used to write an error Severity: error --> Exception: Too few arguments to function Data::v1(), 0 passed in /var/www/openml/system/core/CodeIgniter.php on line 532 and exactly 1 expected /var/www/openml/openml_OS/controllers/Data.php 42 and return XML about an PHP error being encountered, and now instead returns an error to the client with "Function not valid".

The arguments aren't used directly anyway.

Since the type is not used, and before PHP 8 superfluous function
arguments get ignored, making it safe to remove.
@omosola
omosola self-requested a review August 4, 2026 16:03
@omosola
omosola marked this pull request as ready for review August 4, 2026 16:03

@omosola omosola left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Makes sense. Good fix 👍

🚢

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.

2 participants