jenkins-bot has submitted this change and it was merged.
Change subject: Fix isset() check in PhpDateTimeParser
......................................................................
Fix isset() check in PhpDateTimeParser
Bug: T93836
Change-Id: Ibe203d0b584ec43a79525db5f5c11448351a62dd
(cherry picked from commit 13ecc63c3feae2708a758a9464dd87431a591809)
---
M lib/includes/parsers/PhpDateTimeParser.php
M lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
2 files changed, 4 insertions(+), 1 deletion(-)
Approvals:
Aude: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/includes/parsers/PhpDateTimeParser.php
b/lib/includes/parsers/PhpDateTimeParser.php
index 986da80..3c02785 100644
--- a/lib/includes/parsers/PhpDateTimeParser.php
+++ b/lib/includes/parsers/PhpDateTimeParser.php
@@ -172,7 +172,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 ad63be6..0f9f825 100644
--- a/lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
+++ b/lib/tests/phpunit/parsers/PhpDateTimeParserTest.php
@@ -137,6 +137,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' =>
@@ -265,6 +267,7 @@
'1980+3',
'1980+x',
'x',
+ 'x x x',
'zz',
'America/New_York'
);
--
To view, visit https://gerrit.wikimedia.org/r/199612
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe203d0b584ec43a79525db5f5c11448351a62dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf22
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits