mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Fix for missing content check where ..body->extsrc is undefined
* Bug fix for accessing undefined extsrc member variable in edge case. See T260082 for deeper explanation of the WT that caused a case where empty flag is not set and extsrc is also missing, but since either case including extsrc being unset indicates no content, this additional check is safe for now. Bug: T259676 Change-Id: I20750c6977883668c83bdae78fbeb171f899e1ab
This commit is contained in:
parent
542bd7fb99
commit
5e5e360ffd
|
@ -159,8 +159,9 @@ class References extends ExtensionTagHandler {
|
||||||
|
|
||||||
$errs = [];
|
$errs = [];
|
||||||
|
|
||||||
// Check for missing content
|
// Check for missing content, added ?? '' to fix T259676 crasher
|
||||||
$missingContent = ( !empty( $cDp->empty ) || trim( $refDmw->body->extsrc ) === '' );
|
// FIXME: See T260082 for a more complete description of cause and deeper fix
|
||||||
|
$missingContent = ( !empty( $cDp->empty ) || trim( $refDmw->body->extsrc ?? '' ) === '' );
|
||||||
|
|
||||||
if ( $missingContent ) {
|
if ( $missingContent ) {
|
||||||
// Check for missing name and content to generate error code
|
// Check for missing name and content to generate error code
|
||||||
|
|
Loading…
Reference in a new issue