Skip to content

TypeError from line 61 of "ImageCaption.php": Argument 3 passed to SMW\ImageCaption\ImageCaption::modifyCaption() must be of the type string, null given #9

Open
@kghbln

Description

@kghbln

Setup and configuration

  • MediaWiki | 1.35.0-rc.2 (37ef236)17:21, 22 August 2020
  • PHP | 7.2.24-0ubuntu0.18.04.6 (apache2handler)
  • MariaDB | 10.1.44-MariaDB-0ubuntu0.18.04.1
  • Semantic MediaWiki | 3.2.0-alpha (127a703) 14:33, 22 August 2020
  • Semantic Image Caption | 1.0.0-alpha (e0ea278) 15:27, 9 August 2020
  • Title Icon | 4.1.1 (2e9ce16) 08:11, 11 July 2020

Issue

[1c6686c5076d115b475b6a2d] /wiki/Cat%C3%A9gorie:Title_Icon_example TypeError from line 61 of /../w/extensions/SemanticImageCaption/src/ImageCaption.php: Argument 3 passed to SMW\ImageCaption\ImageCaption::modifyCaption() must be of the type string, null given, called in /../w/extensions/SemanticImageCaption/src/Hooks.php on line 98

This was not caused by the recent update to MW 1.35.x. It just happens that I only now had a look at the logs and reported it.

Backtrace

#0 /../w/extensions/SemanticImageCaption/src/Hooks.php(98): SMW\ImageCaption\ImageCaption->modifyCaption(Title, LocalFile, NULL, string)
#1 /../w/includes/HookContainer/HookContainer.php(320): SMW\ImageCaption\Hooks::onImageBeforeProduceHTML(DummyLinker, Title, LocalFile, array, array, boolean, NULL, Parser, string, NULL)
#2 /../w/includes/HookContainer/HookContainer.php(131): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#3 /../w/includes/HookContainer/HookRunner.php(2082): MediaWiki\HookContainer\HookContainer->run(string, array)
#4 /../w/includes/Linker.php(308): MediaWiki\HookContainer\HookRunner->onImageBeforeProduceHTML(DummyLinker, Title, LocalFile, array, array, boolean, NULL, Parser, string, NULL)
#5 /../w/extensions/TitleIcon/TitleIcon.php(201): Linker::makeImageLink(Parser, Title, LocalFile, array, array)
#6 /../w/extensions/TitleIcon/TitleIcon.php(138): TitleIcon->getIconHTML()
#7 /../w/extensions/TitleIcon/TitleIcon.php(74): TitleIcon->handlePageTitle(OutputPage)
#8 /../w/includes/HookContainer/HookContainer.php(320): TitleIcon::showIconInPageTitle(OutputPage, SkinVector)
#9 /../w/includes/HookContainer/HookContainer.php(131): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#10 /../w/includes/HookContainer/HookRunner.php(997): MediaWiki\HookContainer\HookContainer->run(string, array, array)
#11 /../w/includes/OutputPage.php(2610): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(OutputPage, SkinVector)
#12 /../w/includes/MediaWiki.php(947): OutputPage->output(boolean)
#13 /../w/includes/MediaWiki.php(960): MediaWiki->{closure}()
#14 /../w/includes/MediaWiki.php(543): MediaWiki->main()
#15 /../w/index.php(53): MediaWiki->run()
#16 /../w/index.php(46): wfIndexMain()
#17 {main}

Steps to reproduce the observation (recommendation is to use the sandbox):
See Category:Title Icon example

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions