[MediaWiki-commits] [Gerrit] mediawiki...Timestamp[master]: Remove dead code in constructor for DateTime returning false

2017-04-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/350322 )

Change subject: Remove dead code in constructor for DateTime returning false
..


Remove dead code in constructor for DateTime returning false

Constructing DateTime either returns the object or throws, it can't return
false. This looks like a left-over from when this returned date_create, which
returns false and exposes its error message through date_get_last_errors().

Change-Id: Ie0c873fe41fee519b3bbfa3026f2f45a2d9781f7
---
M src/ConvertibleTimestamp.php
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve



diff --git a/src/ConvertibleTimestamp.php b/src/ConvertibleTimestamp.php
index 5ed934a..657c7e1 100644
--- a/src/ConvertibleTimestamp.php
+++ b/src/ConvertibleTimestamp.php
@@ -159,10 +159,6 @@
throw new TimestampException( __METHOD__ . ': Invalid 
timestamp format.', $e->getCode(), $e );
}
 
-   if ( $final === false ) {
-   throw new TimestampException( __METHOD__ . ': Invalid 
timestamp format.' );
-   }
-
$this->timestamp = $final;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/350322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0c873fe41fee519b3bbfa3026f2f45a2d9781f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/Timestamp
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timestamp[master]: Remove dead code in constructor for DateTime returning false

2017-04-25 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/350322 )

Change subject: Remove dead code in constructor for DateTime returning false
..

Remove dead code in constructor for DateTime returning false

Constructing DateTime either returns the object or throws, it can't return
false. This looks like a left-over from when this returned date_create, which
returns false and exposes its error message through date_get_last_errors().

Change-Id: Ie0c873fe41fee519b3bbfa3026f2f45a2d9781f7
---
M src/ConvertibleTimestamp.php
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/Timestamp 
refs/changes/22/350322/1

diff --git a/src/ConvertibleTimestamp.php b/src/ConvertibleTimestamp.php
index 5ed934a..657c7e1 100644
--- a/src/ConvertibleTimestamp.php
+++ b/src/ConvertibleTimestamp.php
@@ -159,10 +159,6 @@
throw new TimestampException( __METHOD__ . ': Invalid 
timestamp format.', $e->getCode(), $e );
}
 
-   if ( $final === false ) {
-   throw new TimestampException( __METHOD__ . ': Invalid 
timestamp format.' );
-   }
-
$this->timestamp = $final;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/350322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0c873fe41fee519b3bbfa3026f2f45a2d9781f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/Timestamp
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits