wiris / moodle-qtype_wq

Wiris Quizzes Commons - question type
4 stars 11 forks source link

Fix: deprecated array access syntax on PHP #48

Closed dcanetma closed 3 years ago

dcanetma commented 3 years ago

The "Array and string offset access syntax with curly braces is deprecated" error appears on PHP7_4 and above.

This error is causing the behat and PHPUnit tests of the MathType Moodle plugin suite to fail both locally and on the TravisCI pipeline.

This pull request includes a simple change that fixes the issue by using a more up-to-date syntax to acess an array.

We're planning to publish a new release of the MathType Moodle plugin suite. The code of this version uses the same branch name as this one: 'release-7.25', on the affected projects on github: filter, atto and tinymce.

dcanetma commented 3 years ago

Looks like we fixed the original haxe file some months ago.

https://github.com/wiris/plugins/commit/3976bb78889bcd2739d88321bc1f7dc85aa9089f

See KB-3997 for more details.

In that case, I'd suggest to discard this pull request and update the 'quizzes/lib' contents with the latest version from the PHP plugins library.

ptorrent-at-wiris commented 3 years ago

We fixed this in the quizzes-compiled version of the quizzes lib. Thanks dani!