Deprecated function: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated

Created on 2 June 2023, over 1 year ago
Updated 10 January 2024, 10 months ago

Problem/Motivation

Deprecated function: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in InstapageCmsPluginHelper::filterInput() (line 555 of modules/contrib/instapage_cms_plugin-instapage_cms_plugin/core/InstapageCmsPluginHelper.php).
InstapageCmsPluginHelper::filterInput(5, 'REQUEST_URI') (Line: 287)
InstapageCmsPluginHelper::extractSlug('https://gerdau-gln.lndo.site') (Line: 214)
InstapageCmsPluginHelper::isCustomParamPresent() (Line: 718)
InstapageCmsPluginDrupal8Connector->isHtmlReplaceNecessary() (Line: 298)
InstapageCmsPluginConnector::isHtmlReplaceNecessary() (Line: 395)
InstapageCmsPluginPageModel->check('404', '') (Line: 507)
InstapageCmsPluginDrupal8Connector->checkPage('404', '') (Line: 289)
InstapageCmsPluginConnector::checkPage('404') (Line: 41)
Drupal\instapage_cms_plugin\EventSubscriber\InstapagePluginSubscriber->onKernelResponse(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 202)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 255)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object, Object, 1) (Line: 92)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

  • Update PHP to 8.1
  • Navigate across some pages
  • Access Reports -> Recent log messages

Proposed resolution

Change line:546 of instapage_cms_plugin-instapage_cms_plugin/core/InstapageCmsPluginHelper.php
From this: public static function filterInput($type, $variableName, $filter = FILTER_DEFAULT, $options = null)
To this: public static function filterInput($type, $variableName, $filter = FILTER_DEFAULT, $options = 0)

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

3.57

Component

Code

Created by

🇧🇷Brazil RonanRBR Fortaleza-CE

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

Comments & Activities

Production build 0.71.5 2024