Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error in instrument after v24 upgrade #8376

Closed
laemtl opened this issue Feb 15, 2023 · 1 comment
Closed

Error in instrument after v24 upgrade #8376

laemtl opened this issue Feb 15, 2023 · 1 comment
Labels
24.0.0-bugs Issues or bug fix PRs that were raised during the testing of release 24.0.0 Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@laemtl
Copy link
Contributor

laemtl commented Feb 15, 2023

Reported by @thomasbeaudry

I have an instrument that won't open in the front-end after the upgrade to v24
$defaults[$elname] = explode("{@}", $defaults[$elname]);

PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc:570\nStack trace:\n#0 /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc(570): explode()\n#1 /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc(511): NDB_BVL_Instrument->_setDefaultsArray()\n#2 /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc(2954): NDB_BVL_Instrument->display()\n#3 /var/www/loris/src/Middleware/UserPageDecorationMiddleware.php(241): NDB_BVL_Instrument->handle()\n#4 /var/www/loris/src/Middleware/PageDecorationMiddleware.php(57): LORIS\Middleware\UserPageDecorationMiddleware->process()\n#5 /var/www/loris/php/libraries/NDB_Page.class.inc(735): LORIS\Middleware\PageDecorationMiddleware->process()\n#6 /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc(2873): NDB_Page->process()\n#7 /var/www/loris/modules/instruments/php/module.class.inc(89): NDB_BVL_Instrument->process()\n#8 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\instruments\Module->handle()\n#9 /var/www/loris/src/Middleware/AuthMiddleware.php(63): LORIS\Middleware\ResponseGenerator->process()\n#10 /var/www/loris/src/Router/ModuleRouter.php(74): LORIS\Middleware\AuthMiddleware->process()\n#11 /var/www/loris/src/Middleware/ExceptionHandlingMiddleware.php(54): LORIS\Router\ModuleRouter->handle()\n#12 /var/www/loris/src/Router/BaseRouter.php(126): LORIS\Middleware\ExceptionHandlingMiddleware->process()\n#13 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\Router\BaseRouter->handle()\n#14 /var/www/loris/src/Middleware/ContentLength.php(52): LORIS\Middleware\ResponseGenerator->process()\n#15 /var/www/loris/htdocs/index.php(55): LORIS\Middleware\ContentLength->process()\n#16 {main}\n thrown in /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc on line 570, referer: https://loris.concordia.ca/instrument_list/?candID=956119&sessionID=668

I changed the line to be: $defaults[$elname] = explode("{@}", implode($defaults[$elname]));
and it works.

@laemtl laemtl added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) 24.0.0-bugs Issues or bug fix PRs that were raised during the testing of release 24.0.0 labels Feb 15, 2023
@thomasbeaudry
Copy link

You can close this, No code changes are required. This is linked to data that was incorrectly saved into the DB from the instrument pre v24

@laemtl laemtl closed this as completed Feb 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
24.0.0-bugs Issues or bug fix PRs that were raised during the testing of release 24.0.0 Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

No branches or pull requests

2 participants