Not handling old file correctly - AdvAgg

Created on 4 August 2023, over 1 year ago
Updated 30 May 2024, 10 months ago

Problem/Motivation

Found another old file not being handled correctly from the advanced aggregates module.
On modern (8.1+) PHP getting this error:

Deprecated function: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\api\Formatter::processPattern() (line 1292 of modules/contrib/api/src/Formatter.php).

Drupal\api\Formatter::processPattern('!'([a-zA-Z0-9_\x7f-\xff]+)'!', NULL, '\Drupal\api\Formatter::linkName', Array, '\Drupal\api\Formatter::makeDocumentationLinks', Array, , '', '') (Line: 1138)
Drupal\api\Formatter::makeDocumentationLinks(NULL, Object, '2724', NULL, Array) (Line: 2894)
Drupal\api\Formatter::linkCode(NULL, Object, '2724', NULL, '1') (Line: 2637)
Drupal\api\Formatter::preparePageFileVariables(Object) (Line: 419)
Drupal\api\Controller\OutputController->branchExplicitRoute(Object, 'advagg_css_compress!csstidy!class.csstidy.inc', Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 50)
Drupal\ban\BanMiddleware->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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 692)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

But I don't think that is the real error.
Ex: https://nickdickinsonwilde.ca/en/work/drupal-api/advagg/advagg_css_compr... doesn't show any content under source
https://nickdickinsonwilde.ca/en/work/drupal-api/advagg/advagg_css_compr... does have full source.

PHP file: https://git.drupalcode.org/project/advagg/-/blob/7.x-1.x/advagg_css_comp...

Steps to reproduce

Add AdvAgg 7.x-1.x to site and navigate to that path.

Proposed resolution

Fix tokenization? Not sure that's what is going wrong but my first guess.
If you want to say, old not fixing it won't complain. (Right now i'm a bit busy and probably won't be investigating it properly)

🐛 Bug report
Status

Fixed

Version

2.0

Component

Parser

Created by

🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024