Skip to content

Commit 644156c

Browse files
nicoschoenmakerHidde Boomsma
authored and
Hidde Boomsma
committed
Fix php 7.1 warning (#12)
`Warning: A non-numeric value encountered` http://php.net/manual/en/migration71.other-changes.php
1 parent 5aaf4e5 commit 644156c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/yaml/sfYamlInline.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static protected function dumpArray($value)
103103
if (
104104
(1 == count($keys) && '0' == $keys[0])
105105
||
106-
(count($keys) > 1 && array_reduce($keys, create_function('$v,$w', 'return (integer) $v + $w;'), 0) == count($keys) * (count($keys) - 1) / 2))
106+
(count($keys) > 1 && array_reduce($keys, create_function('$v,$w', 'return ((int) $v) + ((int) $w);'), 0) == count($keys) * (count($keys) - 1) / 2))
107107
{
108108
$output = array();
109109
foreach ($value as $val)

0 commit comments

Comments
 (0)