Problem/Motivation

  • Fix the following error:
    Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\openstack\Service\OpenStackOperationsService->getAssociatedPortOptions() (line 4988 of /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Service/OpenStackOperationsService.php)
    #0 /var/www/html/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
    #1 [internal function]: _drupal_error_handler()
    #2 /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Service/OpenStackOperationsService.php(4988): strpos()
    #3 /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Form/OpenStackFloatingIpAssociateForm.php(163): Drupal\openstack\Service\OpenStackOperationsService->getAssociatedPortOptions()
    #4 [internal function]: Drupal\openstack\Form\OpenStackFloatingIpAssociateForm->buildForm()
    #5 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array()
    #6 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(283): Drupal\Core\Form\FormBuilder->retrieveForm()
    #7 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #10 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #12 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #15 /var/www/html/web/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(68): Symfony\Component\HttpKernel\HttpKernel->handle()
    #16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle()
    #17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #18 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #19 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #20 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #21 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #23 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #24 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #25 {main}

Issue fork cloud-3401420

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yas created an issue. See original summary.

yas’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Reviewed & tested by the community

@all

The tests have been passed successfully, I'll merge the patch to 5.x and 6.x, and close this issue as Fixed.

yas’s picture

Status: Reviewed & tested by the community » Fixed

  • yas committed ef4d1fa2 on 6.x
    Issue #3401420 by yas: Fix an error: "Deprecated function: strpos():...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.