projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d78ed66
)
Simplify code
author
Jordi Boggiano
<j.boggiano@seld.be>
Fri, 13 Apr 2012 12:22:03 +0000 (14:22 +0200)
committer
Jordi Boggiano
<j.boggiano@seld.be>
Fri, 13 Apr 2012 12:22:03 +0000 (14:22 +0200)
lib/Twig/Extension/Core.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Core.php
b/lib/Twig/Extension/Core.php
index
14fbca7
..
2b54a5c
100644
(file)
--- a/
lib/Twig/Extension/Core.php
+++ b/
lib/Twig/Extension/Core.php
@@
-986,7
+986,7
@@
else
/* used internally */
function twig_ensure_traversable($seq)
{
- if (is_array($seq) || (is_object($seq) && $seq instanceof Traversable)) {
+ if (is_array($seq) || $seq instanceof Traversable) {
return $seq;
} else {
return array();
@@
-1032,5
+1032,5
@@
function twig_test_empty($value)
*/
function twig_test_traversable($value)
{
- return is_array($value) || (is_object($value) && $value instanceof Traversable);
+ return is_array($value) || $value instanceof Traversable;
}