- 🇪🇪Estonia tormi Tallinn
Patched D7 branch here: https://www.drupal.org/project/fastly/issues/3408149#comment-15356279 🐛 TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() Needs review .
ConfigFactoryInterface::get() returns an ImmutableConfig object but Webhook::sendWebHook() treats this value as an array causing the PHP warnings detailed below:
Warning: in_array() expects parameter 2 to be array, null given in Drupal\fastly\Services\Webhook->sendWebHook() (line 54 of modules/contrib/fastly/src/Services/Webhook.php).
Warning: in_array() expects parameter 2 to be array, null given in Drupal\fastly\Services\Webhook->sendWebHook() (line 54 of modules/contrib/fastly/src/Services/Webhook.php).
Warning: in_array() expects parameter 2 to be array, null given in Drupal\fastly\Services\Webhook->sendWebHook() (line 54 of modules/contrib/fastly/src/Services/Webhook.php).
Warning: in_array() expects parameter 2 to be array, null given in Drupal\fastly\Services\Webhook->sendWebHook() (line 54 of modules/contrib/fastly/src/Services/Webhook.php).
Warning: in_array() expects parameter 2 to be array, null given in Drupal\fastly\Services\Webhook->sendWebHook() (line 54 of modules/contrib/fastly/src/Services/Webhook.php).
Warning: in_array() expects parameter 2 to be array, null given in Drupal\fastly\Services\Webhook->sendWebHook() (line 54 of /mnt/www/COMPANY/releases/20171012083219Z/web/modules/contrib/fastly/src/Services/Webhook.php) #0 /mnt/www/COMPANY/releases/20171012083219Z/web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(2, 'in_array() expe...', '/mnt/www/COMPANY/...', 54, Array) #1 [internal function]: _drupal_error_handler(2, 'in_array() expe...', '/mnt/www/COMPANY/...', 54, Array) #2 /mnt/www/COMPANY/releases/20171012083219Z/web/modules/contrib/fastly/src/Services/Webhook.php(54): in_array('config_save', NULL) #3 /mnt/www/COMPANY/releases/20171012083219Z/web/modules/contrib/fastly/src/Form/FastlySettingsForm.php(413): Drupal\fastly\Services\Webhook->sendWebHook('Fastly module c...', 'config_save') #4 [internal function]: Drupal\fastly\Form\FastlySettingsForm->submitForm(Array, Object(Drupal\Core\Form\FormState)) #5 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array) #6 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #7 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/Form/FormBuilder.php(585): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #8 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('fastly_settings', Array, Object(Drupal\Core\Form\FormState)) #9 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('fastly_settings', Object(Drupal\Core\Form\FormState)) #10 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #11 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #12 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/Render/Renderer.php(576): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #13 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #14 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #15 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 /mnt/www/COMPANY/releases/20171012083219Z/web/vendor/symfony/http-kernel/HttpKernel.php(153): call_user_func_array(Object(Closure), Array) #17 /mnt/www/COMPANY/releases/20171012083219Z/web/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #18 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /mnt/www/COMPANY/releases/20171012083219Z/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /mnt/www/COMPANY/releases/20171012083219Z/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /mnt/www/COMPANY/releases/20171012083219Z/web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /mnt/www/COMPANY/releases/20171012083219Z/web/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /mnt/www/COMPANY/releases/20171012083219Z/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #27 {main}.
Fixed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Patched D7 branch here: https://www.drupal.org/project/fastly/issues/3408149#comment-15356279 🐛 TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() Needs review .