Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A non well formed numeric value encountered #20

Open
Oirbsiu opened this issue Jan 26, 2018 · 4 comments
Open

A non well formed numeric value encountered #20

Oirbsiu opened this issue Jan 26, 2018 · 4 comments
Assignees

Comments

@Oirbsiu
Copy link

Oirbsiu commented Jan 26, 2018

Hi,
Not sure if this is a common issue but I recently installed rsyslog / loganalyzer on a Vm runing CentOS 7.4 with PHP v7.2

I noticed in the error logs these entries repeating when accessing the loganalyzer website

[Fri Jan 26 08:26:34.176898 2018] [php7:notice] [pid xx] [client x.x.x.x:57379] PHP Notice: A non well formed numeric value encountered in /var/www/html/logAnalyser/include/functions_common.php on line 2197, referer: https://xxx/admin/index.php [Fri Jan 26 08:26:34.176898 2018] [php7:notice] [pid xx] [client x.x.x.x:57379] PHP Notice: A non well formed numeric value encountered in /var/www/html/logAnalyser/include/functions_common.php on line 2200, referer: https://xxx/admin/index.php [Fri Jan 26 08:26:34.176898 2018] [php7:notice] [pid xx] [client x.x.x.x:57379] PHP Notice: A non well formed numeric value encountered in /var/www/html/logAnalyser/include/functions_common.php on line 2203, referer: https://xxx/admin/index.php [Fri Jan 26 08:26:34.176898 2018] [php7:notice] [pid xx] [client x.x.x.x:57379] PHP Notice: A non well formed numeric value encountered in /var/www/html/logAnalyser/include/functions_common.php on line 2206, referer: https://xxx/admin/index.php

So I had a look at functions_common.php and added this line at line 2193

settype($userdefaultfontsize, "integer");

And now no more errors.

There maybe a better way to change but tis works for me.
Mark

@apinchang
Copy link

good job

@alorbach
Copy link
Member

[notice] are not errors, so I would not call it a bug. Default php installations don't show notices at all.
But it looks like php 7.2 has been hardened regarding datatypes.

Loganalyzer has not been checked for php 7.2 compatibility yet, this needs to be done.

A good solution to make sure the $userdefaultfontsize is an integer using:
settype($userdefaultfontsize, "integer");

Will be added with the next minor update.

@kyrenya
Copy link

kyrenya commented Mar 7, 2019

this has just saved my life XD XD Thx!

@spacecabbie
Copy link
Contributor

[notice] are not errors, so I would not call it a bug. Default php installations don't show notices at all.
But it looks like php 7.2 has been hardened regarding datatypes.

Loganalyzer has not been checked for php 7.2 compatibility yet, this needs to be done.

A good solution to make sure the $userdefaultfontsize is an integer using:
settype($userdefaultfontsize, "integer");

Will be added with the next minor update.

@alorbach I belive this has since been fixed? Can we close ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants