Skip to content

Conversation

@jheim2
Copy link

@jheim2 jheim2 commented Aug 29, 2024

Set $title to an empty string if the "upload_files" key is missing from the $_POST array, preventing the PHP script from crashing when copying a course with OnlyOffice objects.

Set $title to an empty string if the "upload_files" key is missing from the `$_POST` array, preventing the PHP script from crashing when copying a course with OnlyOffice objects.
@rfalkenstein
Copy link

Some more context for reproduction:
The error report we receive is the following: "Whoops\Exception\ErrorException thrown with message "Trying to access array offset on value of type null".

#22 Whoops\Exception\ErrorException in /path/to/webroot/Customizing/global/plugins/Services/Repository/RepositoryObject/OnlyOffice/classes/class.ilObjOnlyOffice.php:79
#21 ilErrorHandling:handlePreWhoops in /path/to/webroot/Customizing/global/plugins/Services/Repository/RepositoryObject/OnlyOffice/classes/class.ilObjOnlyOffice.php:79
#20 ilObjOnlyOffice:doCreate in /path/to/webroot/Services/Object/classes/class.ilObject2.php:55
#19 ilObject2:create in /path/to/webroot/Services/Object/classes/class.ilObject.php:1600
#18 ilObject:cloneObject in /path/to/webroot/Services/Object/classes/class.ilObject2.php:129
#17 ilObject2:cloneObject in /path/to/webroot/webservice/soap/classes/class.ilSoapUtils.php:409
#16 ilSoapUtils:cloneNode in /path/to/webroot/webservice/soap/classes/class.ilSoapUtils.php:264
#15 ilSoapUtils:ilClone in /path/to/webroot/webservice/soap/include/inc.soap_functions.php:464
#14 ilSoapFunctions:ilClone in /path/to/webroot/webservice/soap/classes/class.ilSoapUtils.php:356
#13 ilSoapUtils:callNextNode in /path/to/webroot/webservice/soap/classes/class.ilSoapUtils.php:265
#12 ilSoapUtils:ilClone in /path/to/webroot/webservice/soap/include/inc.soap_functions.php:464
#11 ilSoapFunctions:ilClone in /path/to/webroot/Services/Container/classes/class.ilContainer.php:555
#10 ilContainer:cloneAllObject in /path/to/webroot/Services/Object/classes/class.ilObjectCopyGUI.php:1071
#9 ilObjectCopyGUI:copyContainer in /path/to/webroot/Services/Object/classes/class.ilObjectCopyGUI.php:920
#8 ilObjectCopyGUI:copyContainerToTargets in /path/to/webroot/Services/Object/classes/class.ilObjectCopyGUI.php:138
#7 ilObjectCopyGUI:executeCommand in /path/to/webroot/Services/UICore/classes/class.ilCtrl.php:203
#6 ilCtrl:forwardCommand in /path/to/webroot/Modules/Category/classes/class.ilObjCategoryGUI.php:196
#5 ilObjCategoryGUI:executeCommand in /path/to/webroot/Services/UICore/classes/class.ilCtrl.php:203
#4 ilCtrl:forwardCommand in /path/to/webroot/Services/Repository/classes/class.ilRepositoryGUI.php:243
#3 ilRepositoryGUI:show in /path/to/webroot/Services/Repository/classes/class.ilRepositoryGUI.php:223
#2 ilRepositoryGUI:executeCommand in /path/to/webroot/Services/UICore/classes/class.ilCtrl.php:203
#1 ilCtrl:forwardCommand in /path/to/webroot/Services/UICore/classes/class.ilCtrl.php:178
#0 ilCtrl:callBaseClass in /path/to/webroot/ilias.php:24

We can reproduce this error not only when copying a course with an OO object but also when copying an OO-object.

@mjansenDatabay mjansenDatabay added the bug Something isn't working label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants