Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symfony 1.4 - Warning: A non-numeric value encountered

Tags:

php

symfony1

Warning: A non-numeric value encountered in C:\Program Files (x86)\Ampps\www\Symfony_project\lib\vendor\symfony1\lib\yaml\sfYamlInline.php(138) : runtime-created function on line 1

Use php 7.1

if (
      (1 == count($keys) && '0' == $keys[0])
      ||
    Line 138->  (count($keys) > 1 && array_reduce($keys, create_function('$v,$w', 'return (integer) $v + $w;'), 0) == count($keys) * (count($keys) - 1) / 2))

23 0.1704 3586632 __lambda_func( ) ...\sfYamlInline.php:138

How to fix?

like image 800
James Adamson Avatar asked Feb 04 '26 05:02

James Adamson


1 Answers

There are some forks of symfony1 out there that are compatible with PHP7.1.

In this case, you can patch this easily by changing 'return (integer) $v + $w;' to 'return (integer) $v + (integer) $w;'.

like image 66
Michael Kopinsky Avatar answered Feb 05 '26 22:02

Michael Kopinsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!