Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

clone in Filter\FilterChain #2391

Closed
wants to merge 1 commit into from

2 participants

@gag237

No description provided.

@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/2391'
Close #2391
2d9e432
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/2391' into develop
Forward port #2391
8c89319
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-filter
@weierophinney weierophinney Merge branch 'hotfix/2391' a2da824
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-filter
@weierophinney weierophinney Merge branch 'hotfix/2391' into develop 584ba22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 20, 2012
  1. @gag237

    cloning Filter\FilterChain

    gag237 authored
This page is out of date. Refresh to see the latest.
View
10 library/Zend/Filter/FilterChain.php
@@ -225,4 +225,14 @@ public function filter($value)
return $valueFiltered;
}
+
+ /**
+ * Clone filters
+ *
+ * @return void
+ */
+ public function __clone()
+ {
+ $this->filters = clone $this->filters;
+ }
}
View
10 tests/ZendTest/Filter/FilterChainTest.php
@@ -158,6 +158,16 @@ public function testCanAttachMultipleFiltersOfTheSameTypeAsDiscreteInstances()
$this->assertEquals('Tu et PARTY', $chain->filter('Tu et Foo'));
}
+
+ public function testClone()
+ {
+ $chain = new FilterChain();
+ $clone = clone $chain;
+
+ $chain->attachByName('strip_tags');
+
+ $this->assertCount(0, $clone);
+ }
}
Something went wrong with that request. Please try again.