[MediaWiki-commits] [Gerrit] trim incoming string values - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: trim incoming string values .. trim incoming string values Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 --- M DataValues/includes/values/StringValue.php M DataValues/tests/phpunit/includes/values/StringValueTest.php 2 files changed, 5 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/includes/values/StringValue.php b/DataValues/includes/values/StringValue.php index 3d231d0..c40fdc7 100644 --- a/DataValues/includes/values/StringValue.php +++ b/DataValues/includes/values/StringValue.php @@ -63,7 +63,10 @@ throw new InvalidArgumentException( 'String length exceeds limit of 400 characters' ); } - $this->value = $value; + // The trim is not at the right place, but the right place would either need us to have + // the parsers or the options in place. So for now it seems that it is not hurting much + // here. It is only in the deployment branch. Like the one in the previous line of code. + $this->value = trim( $value ); } /** diff --git a/DataValues/tests/phpunit/includes/values/StringValueTest.php b/DataValues/tests/phpunit/includes/values/StringValueTest.php index 3b588a1..ea0227d 100644 --- a/DataValues/tests/phpunit/includes/values/StringValueTest.php +++ b/DataValues/tests/phpunit/includes/values/StringValueTest.php @@ -64,7 +64,7 @@ $argLists[] = array( false, null ); $argLists[] = array( true, 'foo' ); $argLists[] = array( true, '' ); - $argLists[] = array( true, ' foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz ' ); + $argLists[] = array( true, 'foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz' ); return $argLists; } -- To view, visit https://gerrit.wikimedia.org/r/67089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf6 Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Denny Vrandecic Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trim incoming string values - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/67089 Change subject: trim incoming string values .. trim incoming string values Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 --- M DataValues/includes/values/StringValue.php M DataValues/tests/phpunit/includes/values/StringValueTest.php 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/89/67089/1 diff --git a/DataValues/includes/values/StringValue.php b/DataValues/includes/values/StringValue.php index 3d231d0..c40fdc7 100644 --- a/DataValues/includes/values/StringValue.php +++ b/DataValues/includes/values/StringValue.php @@ -63,7 +63,10 @@ throw new InvalidArgumentException( 'String length exceeds limit of 400 characters' ); } - $this->value = $value; + // The trim is not at the right place, but the right place would either need us to have + // the parsers or the options in place. So for now it seems that it is not hurting much + // here. It is only in the deployment branch. Like the one in the previous line of code. + $this->value = trim( $value ); } /** diff --git a/DataValues/tests/phpunit/includes/values/StringValueTest.php b/DataValues/tests/phpunit/includes/values/StringValueTest.php index 3b588a1..ea0227d 100644 --- a/DataValues/tests/phpunit/includes/values/StringValueTest.php +++ b/DataValues/tests/phpunit/includes/values/StringValueTest.php @@ -64,7 +64,7 @@ $argLists[] = array( false, null ); $argLists[] = array( true, 'foo' ); $argLists[] = array( true, '' ); - $argLists[] = array( true, ' foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz ' ); + $argLists[] = array( true, 'foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz' ); return $argLists; } -- To view, visit https://gerrit.wikimedia.org/r/67089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf6 Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Denny Vrandecic ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trim incoming string values - change (mediawiki...DataValues)
Denny Vrandecic has submitted this change and it was merged. Change subject: trim incoming string values .. trim incoming string values Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 --- M DataValues/includes/values/StringValue.php M DataValues/tests/phpunit/includes/values/StringValueTest.php 2 files changed, 5 insertions(+), 2 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/includes/values/StringValue.php b/DataValues/includes/values/StringValue.php index 678fa6d..3c57840 100644 --- a/DataValues/includes/values/StringValue.php +++ b/DataValues/includes/values/StringValue.php @@ -63,7 +63,10 @@ throw new InvalidArgumentException( 'String length exceeds limit of 400 characters' ); } - $this->value = $value; + // The trim is not at the right place, but the right place would either need us to have + // the parsers or the options in place. So for now it seems that it is not hurting much + // here. It is only in the deployment branch. Like the one in the previous line of code. + $this->value = trim( $value ); } /** diff --git a/DataValues/tests/phpunit/includes/values/StringValueTest.php b/DataValues/tests/phpunit/includes/values/StringValueTest.php index 3b588a1..ea0227d 100644 --- a/DataValues/tests/phpunit/includes/values/StringValueTest.php +++ b/DataValues/tests/phpunit/includes/values/StringValueTest.php @@ -64,7 +64,7 @@ $argLists[] = array( false, null ); $argLists[] = array( true, 'foo' ); $argLists[] = array( true, '' ); - $argLists[] = array( true, ' foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz ' ); + $argLists[] = array( true, 'foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz' ); return $argLists; } -- To view, visit https://gerrit.wikimedia.org/r/64937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Denny Vrandecic Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trim incoming string values - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/64937 Change subject: trim incoming string values .. trim incoming string values Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 --- M DataValues/includes/values/StringValue.php M DataValues/tests/phpunit/includes/values/StringValueTest.php 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/37/64937/1 diff --git a/DataValues/includes/values/StringValue.php b/DataValues/includes/values/StringValue.php index 678fa6d..3c57840 100644 --- a/DataValues/includes/values/StringValue.php +++ b/DataValues/includes/values/StringValue.php @@ -63,7 +63,10 @@ throw new InvalidArgumentException( 'String length exceeds limit of 400 characters' ); } - $this->value = $value; + // The trim is not at the right place, but the right place would either need us to have + // the parsers or the options in place. So for now it seems that it is not hurting much + // here. It is only in the deployment branch. Like the one in the previous line of code. + $this->value = trim( $value ); } /** diff --git a/DataValues/tests/phpunit/includes/values/StringValueTest.php b/DataValues/tests/phpunit/includes/values/StringValueTest.php index 3b588a1..ea0227d 100644 --- a/DataValues/tests/phpunit/includes/values/StringValueTest.php +++ b/DataValues/tests/phpunit/includes/values/StringValueTest.php @@ -64,7 +64,7 @@ $argLists[] = array( false, null ); $argLists[] = array( true, 'foo' ); $argLists[] = array( true, '' ); - $argLists[] = array( true, ' foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz ' ); + $argLists[] = array( true, 'foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz' ); return $argLists; } -- To view, visit https://gerrit.wikimedia.org/r/64937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Denny Vrandecic ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trim incoming string values - change (mediawiki...DataValues)
Daniel Kinzler has submitted this change and it was merged. Change subject: trim incoming string values .. trim incoming string values Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 --- M DataValues/includes/values/StringValue.php M DataValues/tests/includes/values/StringValueTest.php 2 files changed, 5 insertions(+), 2 deletions(-) Approvals: Daniel Kinzler: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/includes/values/StringValue.php b/DataValues/includes/values/StringValue.php index 678fa6d..3c57840 100644 --- a/DataValues/includes/values/StringValue.php +++ b/DataValues/includes/values/StringValue.php @@ -63,7 +63,10 @@ throw new InvalidArgumentException( 'String length exceeds limit of 400 characters' ); } - $this->value = $value; + // The trim is not at the right place, but the right place would either need us to have + // the parsers or the options in place. So for now it seems that it is not hurting much + // here. It is only in the deployment branch. Like the one in the previous line of code. + $this->value = trim( $value ); } /** diff --git a/DataValues/tests/includes/values/StringValueTest.php b/DataValues/tests/includes/values/StringValueTest.php index 3b588a1..ea0227d 100644 --- a/DataValues/tests/includes/values/StringValueTest.php +++ b/DataValues/tests/includes/values/StringValueTest.php @@ -64,7 +64,7 @@ $argLists[] = array( false, null ); $argLists[] = array( true, 'foo' ); $argLists[] = array( true, '' ); - $argLists[] = array( true, ' foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz ' ); + $argLists[] = array( true, 'foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz' ); return $argLists; } -- To view, visit https://gerrit.wikimedia.org/r/63834 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf4 Gerrit-Owner: Denny Vrandecic Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trim incoming string values - change (mediawiki...DataValues)
Denny Vrandecic has uploaded a new change for review. https://gerrit.wikimedia.org/r/63834 Change subject: trim incoming string values .. trim incoming string values Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 --- M DataValues/includes/values/StringValue.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/34/63834/1 diff --git a/DataValues/includes/values/StringValue.php b/DataValues/includes/values/StringValue.php index 678fa6d..90c5936 100644 --- a/DataValues/includes/values/StringValue.php +++ b/DataValues/includes/values/StringValue.php @@ -63,7 +63,7 @@ throw new InvalidArgumentException( 'String length exceeds limit of 400 characters' ); } - $this->value = $value; + $this->value = trim( $value ); } /** -- To view, visit https://gerrit.wikimedia.org/r/63834 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0055dddbb0b810432879d275e1e102069e7736c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf4 Gerrit-Owner: Denny Vrandecic ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits