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

Plugin uses GD extension with freetype enabled, but doesn't do required/optional in a environment.xml #73

Closed
danowar2k opened this issue Apr 27, 2023 · 3 comments · Fixed by #80
Assignees
Milestone

Comments

@danowar2k
Copy link

Moodle provides the ability to do an environment.xml where you describe which PHP version or PHP extensions your plugin needs.

Moodle core requires the GD extension, but doesn't check apart from "is this extension present".

You use freetype only functions, namely imagettfbbox():

$bbox = imagettfbbox(20, 0, $CFG->dirroot . '/lib/default.ttf', $text->nodeValue);

Could you add an environment.xml with a "required" for GD and an "optional check" with a custom function checking if freetype is enabled?

It would help others to determine the requirements to use this plugin better.

Or you could just replace the function with something else ;-)

@danowar2k
Copy link
Author

Relevant Moodle core issue: https://tracker.moodle.org/browse/MDL-58999

Issue in some other plugin we're using: jleyva/moodle-block_configurablereports#233

@sh-csg sh-csg added this to the 1.0 milestone Jun 3, 2023
@sh-csg sh-csg self-assigned this Jun 3, 2023
@sh-csg sh-csg linked a pull request Jun 3, 2023 that will close this issue
@PhMemmel
Copy link
Member

PhMemmel commented Jun 4, 2023

@danowar2k Would you mind testing the linked PR against the environment you experienced the issue?

@danowar2k
Copy link
Author

Sorry had advisory absolutely no time to confirm this...

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 a pull request may close this issue.

3 participants