Opencast plugin for ILIAS LMS. The plugin shows a Opencast series as an ILIAS object. This version of the ILIAS plugin for Opencast is operated and developed collaboratively by a community. The University of Bern acts as coordinative maintainer.
GNU General Public License v3.0
13
stars
14
forks
source link
Release 7: PHP error when instances of `xoctUser` are created within `ilObjOpenCastAccess::getProducersForRefID` #265
Describe the bug
When xoctUser::getInstance is called within \ilObjOpenCastAccess::getProducersForRefID, the passed $participant_id is (depending on the ILIAS release) a numeric string, not of type int as expected here: \srag\Plugins\Opencast\Model\User\xoctUser::__construct.
The problem occurs when new OpenCast objects are created in the ILIAS repository, and due to this problem, the script terminates/crashes. Nevertheless, the object could be created, but incompletely.
To Reproduce
We found this PHP error several times in the log file of customer installations.
Expected behavior
No error occurs.
Screenshots
None
Log
TypeError thrown with message "Argument 1 passed to srag\Plugins\Opencast\Model\User\xoctUser::__construct() must be of the type int, string given, called in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/src/Model/User/xoctUser.php on line 111"
Stacktrace:
#13 TypeError in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/src/Model/User/xoctUser.php:120
#12 srag\Plugins\Opencast\Model\User\xoctUser:__construct in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/src/Model/User/xoctUser.php:111
#11 srag\Plugins\Opencast\Model\User\xoctUser:getInstance in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.ilObjOpenCastAccess.php:349
#10 ilObjOpenCastAccess:getProducersForRefID in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.ilObjOpenCastGUI.php:395
#9 ilObjOpenCastGUI:afterSave in /srv/www/my.ilias.de/Services/Object/classes/class.ilObjectGUI.php:1064
#8 ilObjectGUI:saveObject in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.ilObjOpenCastGUI.php:367
#7 ilObjOpenCastGUI:save in /srv/www/my.ilias.de/Services/Repository/classes/class.ilObjectPluginGUI.php:149
#6 ilObjectPluginGUI:executeCommand in /srv/www/my.ilias.de/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.ilObjOpenCastGUI.php:190
#5 ilObjOpenCastGUI:executeCommand in /srv/www/my.ilias.de/Services/UICore/classes/class.ilCtrl.php:217
#4 ilCtrl:forwardCommand in /srv/www/my.ilias.de/Services/Repository/classes/class.ilRepositoryGUI.php:375
#3 ilRepositoryGUI:show in /srv/www/my.ilias.de/Services/Repository/classes/class.ilRepositoryGUI.php:337
#2 ilRepositoryGUI:executeCommand in /srv/www/my.ilias.de/Services/UICore/classes/class.ilCtrl.php:217
#1 ilCtrl:forwardCommand in /srv/www/my.ilias.de/Services/UICore/classes/class.ilCtrl.php:178
#0 ilCtrl:callBaseClass in /srv/www/my.ilias.de/ilias.php:23
Environment (please complete the following information):
Describe the bug When
xoctUser::getInstance
is called within\ilObjOpenCastAccess::getProducersForRefID
, the passed$participant_id
is (depending on the ILIAS release) a numeric string, not of typeint
as expected here:\srag\Plugins\Opencast\Model\User\xoctUser::__construct
.The problem occurs when new OpenCast objects are created in the ILIAS repository, and due to this problem, the script terminates/crashes. Nevertheless, the object could be created, but incompletely.
To Reproduce We found this PHP error several times in the log file of customer installations.
Expected behavior No error occurs.
Screenshots None
Log
Environment (please complete the following information):
Additional context None