Page MenuHomePhabricator

PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(356)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(356)preg_match(string, null)
#2/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(96)FormatMetadata->makeFormattedData(array)
#3/srv/mediawiki/php-1.44.0-wmf.13/includes/media/MediaHandler.php(726)FormatMetadata::getFormattedData(array, MediaWiki\Context\RequestContext)
#4/srv/mediawiki/php-1.44.0-wmf.13/includes/media/ExifBitmapHandler.php(149)MediaHandler->formatMetadataHelper(array, MediaWiki\Context\RequestContext)
#5/srv/mediawiki/php-1.44.0-wmf.13/includes/filerepo/file/File.php(2044)ExifBitmapHandler->formatMetadata(LocalFile, MediaWiki\Context\RequestContext)
#6/srv/mediawiki/php-1.44.0-wmf.13/includes/page/ImagePage.php(136)File->formatMetadata(MediaWiki\Context\RequestContext)
#7/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ViewAction.php(78)ImagePage->view()
#8/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(732)ViewAction->show()
#9/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(509)MediaWiki\Actions\ActionEntryPoint->performAction(ImagePage, MediaWiki\Title\Title)
#10/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(145)MediaWiki\Actions\ActionEntryPoint->performRequest()
#11/srv/mediawiki/php-1.44.0-wmf.13/includes/MediaWikiEntryPoint.php(202)MediaWiki\Actions\ActionEntryPoint->execute()
#12/srv/mediawiki/php-1.44.0-wmf.13/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#13/srv/mediawiki/w/index.php(3)require(string)
#14{main}
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(364)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(364)preg_match(string, null)
#2/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(96)FormatMetadata->makeFormattedData(array)
#3/srv/mediawiki/php-1.44.0-wmf.13/includes/media/MediaHandler.php(726)FormatMetadata::getFormattedData(array, MediaWiki\Context\RequestContext)
#4/srv/mediawiki/php-1.44.0-wmf.13/includes/media/ExifBitmapHandler.php(149)MediaHandler->formatMetadataHelper(array, MediaWiki\Context\RequestContext)
#5/srv/mediawiki/php-1.44.0-wmf.13/includes/filerepo/file/File.php(2044)ExifBitmapHandler->formatMetadata(LocalFile, MediaWiki\Context\RequestContext)
#6/srv/mediawiki/php-1.44.0-wmf.13/includes/page/ImagePage.php(136)File->formatMetadata(MediaWiki\Context\RequestContext)
#7/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ViewAction.php(78)ImagePage->view()
#8/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(732)ViewAction->show()
#9/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(509)MediaWiki\Actions\ActionEntryPoint->performAction(ImagePage, MediaWiki\Title\Title)
#10/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(145)MediaWiki\Actions\ActionEntryPoint->performRequest()
#11/srv/mediawiki/php-1.44.0-wmf.13/includes/MediaWikiEntryPoint.php(202)MediaWiki\Actions\ActionEntryPoint->execute()
#12/srv/mediawiki/php-1.44.0-wmf.13/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#13/srv/mediawiki/w/index.php(3)require(string)
#14{main}
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(373)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(373)preg_match(string, null)
#2/srv/mediawiki/php-1.44.0-wmf.13/includes/media/FormatMetadata.php(96)FormatMetadata->makeFormattedData(array)
#3/srv/mediawiki/php-1.44.0-wmf.13/includes/media/MediaHandler.php(726)FormatMetadata::getFormattedData(array, MediaWiki\Context\RequestContext)
#4/srv/mediawiki/php-1.44.0-wmf.13/includes/media/ExifBitmapHandler.php(149)MediaHandler->formatMetadataHelper(array, MediaWiki\Context\RequestContext)
#5/srv/mediawiki/php-1.44.0-wmf.13/includes/filerepo/file/File.php(2044)ExifBitmapHandler->formatMetadata(LocalFile, MediaWiki\Context\RequestContext)
#6/srv/mediawiki/php-1.44.0-wmf.13/includes/page/ImagePage.php(136)File->formatMetadata(MediaWiki\Context\RequestContext)
#7/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ViewAction.php(78)ImagePage->view()
#8/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(732)ViewAction->show()
#9/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(509)MediaWiki\Actions\ActionEntryPoint->performAction(ImagePage, MediaWiki\Title\Title)
#10/srv/mediawiki/php-1.44.0-wmf.13/includes/actions/ActionEntryPoint.php(145)MediaWiki\Actions\ActionEntryPoint->performRequest()
#11/srv/mediawiki/php-1.44.0-wmf.13/includes/MediaWikiEntryPoint.php(202)MediaWiki\Actions\ActionEntryPoint->execute()
#12/srv/mediawiki/php-1.44.0-wmf.13/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#13/srv/mediawiki/w/index.php(3)require(string)
#14{main}
Impact
Notes

The same null currently hits 3 preg_match() calls

Looking at https://commons.wikimedia.org/wiki/File:John_Watling%27s_Distillery_bar,_Nassau,_Bahamas_(March_14,_2024).jpg

GPS date is empty:

Screenshot 2025-01-27 at 22.10.07.png (204×435 px, 20 KB)

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Change #1114466 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@master] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114466

Change #1114466 merged by jenkins-bot:

[mediawiki/core@master] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114466

Change #1114698 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@REL1_43] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114698

Change #1114699 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@REL1_42] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114699

Change #1114700 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@REL1_39] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114700

Change #1114701 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@wmf/1.44.0-wmf.13] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114701

Change #1114702 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@wmf/1.44.0-wmf.14] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114702

Change #1114699 merged by jenkins-bot:

[mediawiki/core@REL1_42] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114699

Change #1114698 merged by jenkins-bot:

[mediawiki/core@REL1_43] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114698

Change #1114700 merged by jenkins-bot:

[mediawiki/core@REL1_39] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114700

Reedy claimed this task.

Change #1114701 merged by jenkins-bot:

[mediawiki/core@wmf/1.44.0-wmf.13] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114701

Change #1114702 merged by jenkins-bot:

[mediawiki/core@wmf/1.44.0-wmf.14] FormatMetadata: Prevent running preg_match() on null

https://gerrit.wikimedia.org/r/1114702

Mentioned in SAL (#wikimedia-operations) [2025-01-28T16:08:44Z] <reedy@deploy2002> Started scap sync-world: Backport for [[gerrit:1114701|FormatMetadata: Prevent running preg_match() on null (T384879)]], [[gerrit:1114702|FormatMetadata: Prevent running preg_match() on null (T384879)]]

Mentioned in SAL (#wikimedia-operations) [2025-01-28T16:13:54Z] <reedy@deploy2002> reedy: Backport for [[gerrit:1114701|FormatMetadata: Prevent running preg_match() on null (T384879)]], [[gerrit:1114702|FormatMetadata: Prevent running preg_match() on null (T384879)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-01-28T16:20:57Z] <reedy@deploy2002> Finished scap sync-world: Backport for [[gerrit:1114701|FormatMetadata: Prevent running preg_match() on null (T384879)]], [[gerrit:1114702|FormatMetadata: Prevent running preg_match() on null (T384879)]] (duration: 12m 12s)