Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.

Fix: handle array input for engine parameter to prevent TypeError - #168

Closed
monicadola42 wants to merge 1 commit into
wikimedia:mainfrom
monicadola42:fix-engine-array
Closed

Fix: handle array input for engine parameter to prevent TypeError#168
monicadola42 wants to merge 1 commit into
wikimedia:mainfrom
monicadola42:fix-engine-array

Conversation

@monicadola42

Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue where passing the engine parameter as an array (e.g., engine[]=tesseract) caused a TypeError in the application.

Changes made

  • Added handling for array input in the engine parameter
  • Ensured the first value is safely extracted when an array is provided
  • Prevented application crash by validating input type

Testing

Tested the following cases locally:

  • engine=tesseract → works correctly
  • engine[]=tesseract → handled safely without crashing

Notes

This ensures the application behaves correctly even when the engine parameter is passed incorrectly as an array.

@monicadola42

Copy link
Copy Markdown
Contributor Author

Closing this PR as suggested. Continuing updates in #167.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant