Skip to content

Commit 3ed7f99

Browse files
authored
Merge pull request #146 from zobzn/fix-php-71-yaml-dump-array
Fixed dumpArray() for PHP 7.1
2 parents 3713bb5 + f738f43 commit 3ed7f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/yaml/sfYamlInline.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static protected function dumpArray($value)
134134
if (
135135
(1 == count($keys) && '0' == $keys[0])
136136
||
137-
(count($keys) > 1 && array_reduce($keys, create_function('$v,$w', '$w = is_numeric($w) ? $w : 0; return (integer) $v + $w;'), 0) == count($keys) * (count($keys) - 1) / 2))
137+
(count($keys) > 1 && array_sum(array_map('intval', $keys)) == count($keys) * (count($keys) - 1) / 2))
138138
{
139139
$output = array();
140140
foreach ($value as $val)

0 commit comments

Comments
 (0)