Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0506f8c

Browse filesBrowse files
committed
Merge remote-tracking branch 'origin/3.4' into 4.4
* origin/3.4: [Workflow] Use a strict comparison when retrieving raw markin in MarkingStore
2 parents e129a16 + 932a4f8 commit 0506f8c
Copy full SHA for 0506f8c

File tree

2 files changed

+14
-1
lines changed
Filter options

2 files changed

+14
-1
lines changed

‎src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getMarking($subject)
4545
{
4646
$placeName = $this->propertyAccessor->getValue($subject, $this->property);
4747

48-
if (!$placeName) {
48+
if (null === $placeName) {
4949
return new Marking();
5050
}
5151

‎src/Symfony/Component/Workflow/Tests/MarkingStore/SingleStateMarkingStoreTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Workflow/Tests/MarkingStore/SingleStateMarkingStoreTest.php
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,17 @@ public function testGetSetMarking()
3131

3232
$this->assertEquals($marking, $marking2);
3333
}
34+
35+
public function testAlmostEmptyPlaceName()
36+
{
37+
$subject = new \stdClass();
38+
$subject->myMarks = 0;
39+
40+
$markingStore = new SingleStateMarkingStore('myMarks');
41+
42+
$marking = $markingStore->getMarking($subject);
43+
44+
$this->assertInstanceOf(Marking::class, $marking);
45+
$this->assertCount(1, $marking->getPlaces());
46+
}
3447
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.