Trying to access array offset on value of type bool in Drupal\h5p\H5PDrupal\H5PDrupal->libraryHasUpgrade()

Created on 22 February 2021, over 4 years ago
Updated 18 June 2024, about 1 year ago

Hi guys,

on PHP 7.4 version, after saving node with H5P field I got this notices:

Notice: Trying to access array offset on value of type bool in Drupal\h5p\H5PDrupal\H5PDrupal->libraryHasUpgrade() (line 1393 of modules/contrib/h5p/src/H5PDrupal/H5PDrupal.php).
Drupal\h5p\H5PDrupal\H5PDrupal->libraryHasUpgrade() (Line: 93)
Drupal\h5peditor\Plugin\Field\FieldWidget\H5PEditorWidget->validate(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 280)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 236)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 236)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 236)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 236)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 236)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'node_quiz_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('node_quiz_edit_form', Array, Object) (Line: 589)
Drupal\Core\Form\FormBuilder->processForm('node_quiz_edit_form', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 60)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Thanks

πŸ› Bug report
Status

Needs review

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine rollins

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany mfrosch

    I've updated the patch for 2.0.0-alpha4

  • πŸ‡ΊπŸ‡ΈUnited States illeace

    The patch makes sense, though the line numbers makes me think it needs to be rebuilt for 2.0.0-alpha6. I'd be happy to do that and test it, but I am not able to see this particular error. Are there any additional steps necessary? Is it only relevant for PHP 7.4? I'm using Drupal 11 and PHP 8.3.

Production build 0.71.5 2024