wiris / moodle-filter_wiris

Moodle plugin that converts any MathML or LaTeX to accessible images using the MathType API services by Wiris
https://www.wiris.com/moodle
GNU General Public License v3.0
16 stars 17 forks source link

MathType filter by WIRIS - PHP 8.1 Error/Exception #117

Closed acquaalta closed 1 year ago

acquaalta commented 1 year ago

Hi,

Moodle version: Moodle 4.1.1 PHP Version: 8.1.16 Plugin ID: filter_wiris Plugin version: 8.0.1 (2022112300)

Problem After upgrading the PHP on our server to version 8.1.16, the "Site administration" main page is unreachable, and also the at least the "Plugins overview" page. Instead of the page itself, we see the following message:

uncaught exception: strpos(): Passing null to parameter #3 ($offset) of type int is deprecated (errno: 8192) in *PATH*/moodle/filter/wiris/integration/lib/php/Boot.class.php at line #369strpos(): Passing null to parameter #3 ($offset) of type int is deprecated

in file: *PATH*/moodle/filter/wiris/integration/lib/php/Boot.class.php line 369
#0 [internal function]: _hx_error_handler()
#1 *PATH*/moodle/filter/wiris/integration/lib/php/Boot.class.php(369): strpos()
#2 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(118): _hx_index_of()
#3 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(108): com_wiris_system_Storage::isSystemFile()
#4 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(100): com_wiris_system_Storage::getCallerFile()
#5 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(95): com_wiris_system_Storage::setResourcesDir()
#6 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(83): com_wiris_system_Storage::getResourcesDir()
#7 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.class.php(8): com_wiris_system_Storage::newResourceStorage()
#8 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/ConfigurationImpl.class.php(152): com_wiris_plugin_impl_DefaultConfigurationUpdater->updateConfiguration()
#9 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/ConfigurationImpl.class.php(163): com_wiris_plugin_impl_ConfigurationImpl->initialize0()
#10 *PATH*/moodle/filter/wiris/classes/pluginwrapper.php(117): com_wiris_plugin_impl_ConfigurationImpl->getProperty()
#11 *PATH*/moodle/filter/wiris/settings.php(42): filter_wiris_pluginwrapper->was_editor_enabled()
#12 *PATH*/moodle/lib/classes/plugininfo/filter.php(133): include('...')
#13 *PATH*/moodle/admin/settings/plugins.php(268): core\plugininfo\filter->load_settings()
#14 *PATH*/moodle/lib/adminlib.php(8831): require('...')
#15 *PATH*/moodle/lib/classes/plugininfo/base.php(539): admin_get_root()
#16 *PATH*/moodle/admin/renderer.php(1850): core\plugininfo\base->get_settings_url()
#17 *PATH*/moodle/admin/renderer.php(351): core_admin_renderer->plugins_control_panel()
#18 *PATH*/moodle/admin/plugins.php(217): core_admin_renderer->plugin_management_page()
#19 {main}

"PATH", of course, is not the original text. We "blurred" the actual path in this bug report.

This bug is a serious issue that prevents us not only from using the plugin, but also impacts the general use of the system. Please fix this bug as soon as possible.

Moodle 4.1 supports PHP 8.1 officially, to the best of our knowledge, so if the plugin supports Moodle 4.1 officially, and it does, it should also be able to work correctly in a PHP 8.1 environment.

Thanks

azmatksa commented 1 year ago

Hi, We're also facing same issue, the PHP version is 8.0.28

azmatksa commented 1 year ago

Hi, It was resolved after upgrading to the latest version of the plugin.

cc: @acquaalta

acquaalta commented 1 year ago

Hi @azmatksa, It's good to know that the new version fixed the issue for you. I'm using PHP 8.1 and the current plugin still has an issue. We are having a correspondence with Wiris outside of here (Github) and I hope to get the new and fixed version in the next few days.

jguillen-at-wiris commented 1 year ago

Hi! Indeed the issue should be fixed in our last release.

Acquaalta, since you have a case with our support team, I will close this issue, as it seems to be about your own case.

Please, make sure your packages are updated.

Thanks!

acquaalta commented 1 year ago

Hi @jguillen-at-wiris, In the last few days we installed the newest version, and now it seems that things got better :-) So I guess the issue can be kept closed.

Thanks

jguillen-at-wiris commented 1 year ago

Thanks for your confirmation! I'm glad it worked! ;)