Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/199604
Change subject: Fix isset() check in PhpDateTimeParser
......................................................................
Fix isset() check in PhpDateTimeParser
Bug: T93836
Change-Id: Ibe203d0b584ec43a79525db5f5c11448351a62dd
---
M lib/includes/parsers/PhpDateTimeParser.php
M lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
2 files changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/04/199604/1
diff --git a/lib/includes/parsers/PhpDateTimeParser.php
b/lib/includes/parsers/PhpDateTimeParser.php
index eabf627..4d32ca5 100644
--- a/lib/includes/parsers/PhpDateTimeParser.php
+++ b/lib/includes/parsers/PhpDateTimeParser.php
@@ -182,7 +182,7 @@
}
}
- if ( !isset( $matches ) ) {
+ if ( !isset( $matches[1] ) ) {
return null;
}
diff --git a/lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
b/lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
index 12bbb87..5821f3e 100644
--- a/lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
+++ b/lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
@@ -136,6 +136,8 @@
array( '+0000000000000111-07-04T00:00:00Z' ),
'4th July 1' =>
array( '+0000000000000001-07-04T00:00:00Z' ),
+ '12.Jun.10x' =>
+ array( '+0000000000000010-06-12T00:00:00Z' ),
// More than 4 digit years
'4th July 10000' =>
@@ -264,6 +266,7 @@
'1980+3',
'1980+x',
'x',
+ 'x x x',
'zz',
'America/New_York'
);
--
To view, visit https://gerrit.wikimedia.org/r/199604
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe203d0b584ec43a79525db5f5c11448351a62dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits